diff options
author | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-05-30 11:31:03 -0400 |
---|---|---|
committer | Mike Bayer <mike_mp@zzzcomputing.com> | 2019-06-20 13:50:41 -0400 |
commit | 190e0139e834e4271268652e058c280787ae69eb (patch) | |
tree | 21e93907a58cd2f390f687ddc5e0c1da1eb25454 /test/dialect/mysql/test_compiler.py | |
parent | ff8e7732b9f656f8cea05544660c18d57dd37864 (diff) | |
download | sqlalchemy-190e0139e834e4271268652e058c280787ae69eb.tar.gz |
Enable F841
This is a very useful assertion which prevents unused variables
from being set up allows code to be more readable and sometimes
even more efficient. test suites seem to be where the most
problems are and there do not seem to be documentation examples
that are using this, or at least the linter is not taking effect
within rst blocks.
Change-Id: I2b3341d8dd14da34879d8425838e66a4b9f8e27d
Diffstat (limited to 'test/dialect/mysql/test_compiler.py')
-rw-r--r-- | test/dialect/mysql/test_compiler.py | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/test/dialect/mysql/test_compiler.py b/test/dialect/mysql/test_compiler.py index 60e11ca29..6355f60c3 100644 --- a/test/dialect/mysql/test_compiler.py +++ b/test/dialect/mysql/test_compiler.py @@ -134,13 +134,12 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): table_name = "testtbl" constraint_name = "constraint" constraint = CheckConstraint("data IS NOT NULL", name=constraint_name) - tbl = Table(table_name, m, Column("data", String(255)), constraint) + Table(table_name, m, Column("data", String(255)), constraint) dialect = mysql.dialect() self.assert_compile( schema.DropConstraint(constraint), - "ALTER TABLE %s DROP CHECK `%s`" - % (table_name, constraint_name), - dialect=dialect + "ALTER TABLE %s DROP CHECK `%s`" % (table_name, constraint_name), + dialect=dialect, ) def test_drop_constraint_mariadb(self): @@ -148,14 +147,14 @@ class CompileTest(fixtures.TestBase, AssertsCompiledSQL): table_name = "testtbl" constraint_name = "constraint" constraint = CheckConstraint("data IS NOT NULL", name=constraint_name) - tbl = Table(table_name, m, Column("data", String(255)), constraint) + Table(table_name, m, Column("data", String(255)), constraint) dialect = mysql.dialect() dialect.server_version_info = (10, 1, 1, "MariaDB") self.assert_compile( schema.DropConstraint(constraint), "ALTER TABLE %s DROP CONSTRAINT `%s`" % (table_name, constraint_name), - dialect=dialect + dialect=dialect, ) def test_create_index_with_length_quoted(self): |