]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
lint: fix lint
authorMingyu Park <mingyuu.dev@gmail.com>
Fri, 31 Jan 2025 14:08:46 +0000 (23:08 +0900)
committerMingyu Park <mingyuu.dev@gmail.com>
Fri, 31 Jan 2025 14:08:46 +0000 (23:08 +0900)
lib/sqlalchemy/dialects/mysql/base.py
test/dialect/mysql/test_compiler.py

index af546cdcd8c5554cbd40d6971f2a88502caee914..96eecc2ba67fa86a2d4d13e66503043475821e05 100644 (file)
@@ -1405,7 +1405,7 @@ class MySQLCompiler(compiler.SQLCompiler):
             coercions.expect_as_key(roles.DMLColumnRole, key): value
             for key, value in on_duplicate.update.items()
         }
-        
+
         # traverses through all table columns to preserve table column order
         for column in (col for col in cols if col.key in on_duplicate_update):
             val = on_duplicate_update[column.key]
index b2eb6033dc855d6685a955036b373d5a170e4abe..8387d4e07c67ef7bf551642f789469ec62cfeb1f 100644 (file)
@@ -1346,10 +1346,11 @@ class InsertOnDuplicateTest(fixtures.TestBase, AssertsCompiledSQL):
             },
             dialect=dialect,
         )
-    
+
     def test_on_update_instrumented_attribute_dict(self):
         class Base(DeclarativeBase):
             pass
+
         class T(Base):
             __tablename__ = "table"
 
@@ -1357,11 +1358,15 @@ class InsertOnDuplicateTest(fixtures.TestBase, AssertsCompiledSQL):
 
         q = insert(T).values(foo=1).on_duplicate_key_update({T.foo: 2})
         self.assert_compile(
-            q, 
-            "INSERT INTO `table` (foo) VALUES (%s) ON DUPLICATE KEY UPDATE foo = %s",
-            {"foo": 1, "param_1": 2}
+            q,
+            (
+                "INSERT INTO `table` (foo) VALUES (%s) "
+                "ON DUPLICATE KEY UPDATE foo = %s"
+            ),
+            {"foo": 1, "param_1": 2},
         )
 
+
 class RegexpCommon(testing.AssertsCompiledSQL):
     def setup_test(self):
         self.table = table(