Apply black
This commit is contained in:
1 parent
ea89043d8c
commit
27e492996c
2 files changed
+5
-2
No files matched your search
@@ -15,7 +15,8 @@ class PostgresqlAnalyser(BaseAnalyser):
|
||||
},
|
||||
{
|
||||
"code": "DROP_INDEX",
|
||||
"fn": lambda sql, **kw: re.search("DROP INDEX", sql) and not re.search("INDEX CONCURRENTLY", sql),
|
||||
"fn": lambda sql, **kw: re.search("DROP INDEX", sql)
|
||||
and not re.search("INDEX CONCURRENTLY", sql),
|
||||
"msg": "DROP INDEX locks table",
|
||||
"mode": "one_liner",
|
||||
"type": "warning",
|
||||
|
||||
@@ -17,7 +17,9 @@ class SqlAnalyserTestCase(unittest.TestCase):
|
||||
errors, _, warnings = self.analyse_sql(sql)
|
||||
self.assertEqual(0, len(errors), "Found errors in sql: {}".format(errors))
|
||||
if not allow_warnings:
|
||||
self.assertEqual(0, len(warnings), "Found warnings in sql: {}".format(errors))
|
||||
self.assertEqual(
|
||||
0, len(warnings), "Found warnings in sql: {}".format(errors)
|
||||
)
|
||||
|
||||
def assertBackwardIncompatibleSql(self, sql):
|
||||
errors, _, _ = self.analyse_sql(sql)
|
||||
|
||||
Reference in new issue
Block a user