]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Fixes Issue #8288
authorJohn Lennox <john.lennox@comcast.net>
Thu, 4 Aug 2022 00:22:05 +0000 (20:22 -0400)
committerJohn Lennox <john.lennox@comcast.net>
Thu, 4 Aug 2022 00:22:05 +0000 (20:22 -0400)
Correcting Flake8 formatting issues

lib/sqlalchemy/dialects/mssql/base.py
test/dialect/mssql/test_reflection.py

index 628f388cf0679aff4356711c36d28241eb681cea..ad2aa7fc0eec890aebbd2bc8035d21d77e4e2809 100644 (file)
@@ -3143,7 +3143,9 @@ class MSDialect(default.DefaultDialect):
         rp = connection.execution_options(future_result=True).execute(
             sql.text(
                 "select ind.index_id, ind.is_unique, ind.name, "
-                "case when ind.index_id = 1 then cast(1 as bit) else cast(0 as bit) end as is_clustered, "
+                "case when ind.index_id = 1 "
+                "then cast(1 as bit) "
+                "else cast(0 as bit) end as is_clustered, "
                 f"{filter_definition} "
                 "from sys.indexes as ind join sys.tables as tab on "
                 "ind.object_id=tab.object_id "
@@ -3454,7 +3456,9 @@ class MSDialect(default.DefaultDialect):
                 TC.c.constraint_type,
                 C.c.constraint_name,
                 text(
-                    "objectproperty(object_id(c.table_schema+'.'+c.constraint_name), 'CnstIsClustKey') as is_clustered"
+                    "objectproperty("
+                    "object_id(c.table_schema+'.'+c.constraint_name),"
+                    "'CnstIsClustKey') as is_clustered"
                 ),
             )
             .where(
index 973acf19fd995259578fadbcb19f06a5d82d0944..b42debeff1fc32ff551c4d12df466c7b2653d2a8 100644 (file)
@@ -608,8 +608,8 @@ class ReflectionTest(fixtures.TestBase, ComparesTables, AssertsCompiledSQL):
         self, metadata, connection
     ):
         """
-        table with one filtered index and one clustered index so each index will have different
-        dialect_options keys
+        table with one filtered index and one clustered index so each index
+        will have different dialect_options keys
         """
         t1 = Table(
             "t",