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/sql/test_deprecations.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/sql/test_deprecations.py')
| -rw-r--r-- | test/sql/test_deprecations.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/sql/test_deprecations.py b/test/sql/test_deprecations.py index 90646c41d..6bf0e8962 100644 --- a/test/sql/test_deprecations.py +++ b/test/sql/test_deprecations.py @@ -102,14 +102,14 @@ class DeprecationWarningsTest(fixtures.TestBase): "The select.autocommit parameter is deprecated and " "will be removed in a future release." ): - stmt = select([column("x")], autocommit=True) + select([column("x")], autocommit=True) def test_select_for_update(self): with testing.expect_deprecated( "The select.for_update parameter is deprecated and " "will be removed in a future release." ): - stmt = select([column("x")], for_update=True) + select([column("x")], for_update=True) @testing.provide_metadata def test_table_useexisting(self): @@ -153,7 +153,7 @@ class DDLListenerDeprecationsTest(fixtures.TestBase): ) def test_append_listener(self): - metadata, table, bind = self.metadata, self.table, self.bind + metadata, table = self.metadata, self.table def fn(*a): return None @@ -209,7 +209,7 @@ class DDLListenerDeprecationsTest(fixtures.TestBase): assert "fnord" in canary def test_deprecated_append_ddl_listener_metadata(self): - metadata, users, engine = self.metadata, self.users, self.engine + metadata, engine = self.metadata, self.engine canary = [] with testing.expect_deprecated(".* is deprecated .*"): metadata.append_ddl_listener( @@ -551,7 +551,7 @@ class TextTest(fixtures.TestBase, AssertsCompiledSQL): with testing.expect_deprecated( "The text.autocommit parameter is deprecated" ): - t = text("select id, name from user", autocommit=True) + text("select id, name from user", autocommit=True) table1 = table( |
