]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
fix linter errors
authorTobias Pfeiffer <tgp@preferred.jp>
Wed, 16 Nov 2022 04:27:07 +0000 (13:27 +0900)
committerTobias Pfeiffer <tgp@preferred.jp>
Wed, 16 Nov 2022 04:27:07 +0000 (13:27 +0900)
lib/sqlalchemy/dialects/sqlite/base.py
lib/sqlalchemy/testing/suite/test_reflection.py
test/dialect/test_sqlite.py

index 26b9c8afc6ddf21efac57549d9efbece15d508ba..d6defa41df60f8fcdd27d8a3cc05fb71c822f675 100644 (file)
@@ -2644,11 +2644,12 @@ class SQLiteDialect(default.DefaultDialect):
         )
         indexes = []
 
-        # regular expression to extract the filter predicate of a partial index.
-        # this could fail to extract the predicate correctly on indexes created like
+        # regular expression to extract the filter predicate of a partial
+        # index. this could fail to extract the predicate correctly on
+        # indexes created like
         #   CREATE INDEX i ON t (col || ') where') WHERE col <> ''
-        # but as this function does not support expression-based indexes this case
-        # does not occur.
+        # but as this function does not support expression-based indexes
+        # this case does not occur.
         partial_pred_re = re.compile(r"\)\s+where\s+(.+)", re.IGNORECASE)
 
         if schema:
index 68d1c13faaeb17883bd3a306c4df689a89472a17..b240984f1c8b9bc47c5292e1ecb6ad77a64254b6 100644 (file)
@@ -2393,7 +2393,12 @@ class ComponentReflectionTestExtra(ComparesIndexes, fixtures.TestBase):
         insp = inspect(connection)
 
         expected = [
-            {"name": "t_idx_2", "column_names": ["x"], "unique": False}
+            {
+                "name": "t_idx_2",
+                "column_names": ["x"],
+                "unique": False,
+                "dialect_options": {},
+            }
         ]
 
         def completeIndex(entry):
index 9425ce1e4594a880a3823714bb98f2a9756c4016..9ed5f64bac85922f7a3962343a4cf0967204faa2 100644 (file)
@@ -2310,7 +2310,8 @@ class ConstraintReflectionTest(fixtures.TestBase):
                 "create table foo_with_partial_index (x integer, y integer)"
             )
             conn.exec_driver_sql(
-                "create unique index ix_partial on foo_with_partial_index (x) where y > 10"
+                "create unique index ix_partial on "
+                "foo_with_partial_index (x) where y > 10"
             )
 
             inspector = inspect(conn)