summaryrefslogtreecommitdiff
path: root/test/sql/test_metadata.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2019-05-30 11:31:03 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2019-06-20 13:50:41 -0400
commit190e0139e834e4271268652e058c280787ae69eb (patch)
tree21e93907a58cd2f390f687ddc5e0c1da1eb25454 /test/sql/test_metadata.py
parentff8e7732b9f656f8cea05544660c18d57dd37864 (diff)
downloadsqlalchemy-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_metadata.py')
-rw-r--r--test/sql/test_metadata.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/sql/test_metadata.py b/test/sql/test_metadata.py
index 3f9667609..0d3a04430 100644
--- a/test/sql/test_metadata.py
+++ b/test/sql/test_metadata.py
@@ -398,7 +398,7 @@ class MetaDataTest(fixtures.TestBase, ComparesTables):
a = Table("a", meta, Column("a", Integer))
a.append_constraint(ForeignKeyConstraint(["a"], ["b.x"]))
- b = Table("b", meta, Column("b", Integer))
+ Table("b", meta, Column("b", Integer))
assert_raises_message(
exc.NoReferencedColumnError,
@@ -477,7 +477,7 @@ class MetaDataTest(fixtures.TestBase, ComparesTables):
def test_sequence_attach_to_table(self):
m1 = MetaData()
s1 = Sequence("s")
- t = Table("a", m1, Column("x", Integer, s1))
+ Table("a", m1, Column("x", Integer, s1))
assert s1.metadata is m1
def test_sequence_attach_to_existing_table(self):
@@ -2044,7 +2044,7 @@ class SchemaTypeTest(fixtures.TestBase):
type_ = self.WrapBoolean()
y = Column("y", type_)
y_copy = y.copy()
- t1 = Table("x", m, y_copy)
+ Table("x", m, y_copy)
is_true(y_copy.type._create_events)
@@ -3750,7 +3750,7 @@ class ColumnOptionsTest(fixtures.TestBase):
def _no_error(self, col):
m = MetaData()
- b = Table("bar", m, Column("id", Integer))
+ Table("bar", m, Column("id", Integer))
t = Table("t", m, col)
schema.CreateTable(t).compile()