]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
Reformatted changed files with black. 11701/head
authorJeff Horemans <jeff.horemans@vortex-financials.be>
Tue, 13 Aug 2024 15:16:38 +0000 (17:16 +0200)
committerJeff Horemans <jeff.horemans@vortex-financials.be>
Tue, 13 Aug 2024 15:16:38 +0000 (17:16 +0200)
lib/sqlalchemy/dialects/sqlite/base.py
test/dialect/test_sqlite.py

index 1db4f49d1587a34f634c464278fefd2a271122e2..a678e10940c448de07de3cbc871bd62556478da1 100644 (file)
@@ -2684,8 +2684,9 @@ class SQLiteDialect(default.DefaultDialect):
         )
         """
         cks = []
-        for match in re.finditer(CHECK_PATTERN, table_data or "",
-                                 re.I | re.S | re.VERBOSE):
+        for match in re.finditer(
+            CHECK_PATTERN, table_data or "", re.I | re.S | re.VERBOSE
+        ):
             name = match.group(1)
 
             if name:
index ccfbb31a06959d9f1db0d6da51d7aebbd78df6a8..0a5acdec946a2786a7cba1538f55f7851aadcf43 100644 (file)
@@ -1817,22 +1817,25 @@ class ConstraintReflectionTest(fixtures.TestBase):
             Table("q", meta, Column("id", Integer), PrimaryKeyConstraint("id"))
 
             # intentional new line
-            Table("r", meta,
-                  Column("id", Integer),
-                  Column("value", Integer),
-                  Column("prefix", String),
-                  PrimaryKeyConstraint("id"),
-                  CheckConstraint("id > 0"),
-                  # Constraint definition with newline and tab characters
-                  CheckConstraint(
-                      """((value > 0) AND \n\t(value < 100) AND \n\t
+            Table(
+                "r",
+                meta,
+                Column("id", Integer),
+                Column("value", Integer),
+                Column("prefix", String),
+                PrimaryKeyConstraint("id"),
+                CheckConstraint("id > 0"),
+                # Constraint definition with newline and tab characters
+                CheckConstraint(
+                    """((value > 0) AND \n\t(value < 100) AND \n\t
                       (value != 50))""",
-                      name='ck_r_value_multiline'),
-                  # Constraint name with special chars and 'check' in the name
-                  CheckConstraint("value IS NOT NULL", name="^check-r* #\n\t"),
-                  # Constraint definition with special characters.
-                  CheckConstraint("prefix NOT GLOB '*[^-. /#,]*'")
-                  )
+                    name="ck_r_value_multiline",
+                ),
+                # Constraint name with special chars and 'check' in the name
+                CheckConstraint("value IS NOT NULL", name="^check-r* #\n\t"),
+                # Constraint definition with special characters.
+                CheckConstraint("prefix NOT GLOB '*[^-. /#,]*'"),
+            )
 
             meta.create_all(conn)
 
@@ -2482,9 +2485,11 @@ class ConstraintReflectionTest(fixtures.TestBase):
                 {"sqltext": "value IS NOT NULL", "name": "^check-r* #\n\t"},
                 # Triple-quote multi-line definition should have added a
                 # newline and whitespace:
-                {"sqltext": "((value > 0) AND \n\t(value < 100) AND \n\t\n"
-                            "                      (value != 50))",
-                 "name": "ck_r_value_multiline"},
+                {
+                    "sqltext": "((value > 0) AND \n\t(value < 100) AND \n\t\n"
+                    "                      (value != 50))",
+                    "name": "ck_r_value_multiline",
+                },
                 {"sqltext": "id > 0", "name": None},
                 {"sqltext": "prefix NOT GLOB '*[^-. /#,]*'", "name": None},
             ],