Skip to content

Commit 628930f

Browse files
pre-commit-ci[bot]kkm-horikawa
authored andcommitted
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 93066e0 commit 628930f

1 file changed

Lines changed: 10 additions & 6 deletions

File tree

tests/panels/test_sql.py

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -885,9 +885,11 @@ def test_sql_prettify_max_length(self):
885885
self.assertIn("SELECT", result)
886886

887887
# Long SQL should skip formatting and show a message
888-
long_sql = "SELECT * FROM auth_user WHERE id IN (" + ", ".join(
889-
[f"'{i}'" for i in range(100)]
890-
) + ")"
888+
long_sql = (
889+
"SELECT * FROM auth_user WHERE id IN ("
890+
+ ", ".join([f"'{i}'" for i in range(100)])
891+
+ ")"
892+
)
891893
result = reformat_sql(long_sql, with_toggle=True)
892894
self.assertIn("SQL formatting skipped", result)
893895
self.assertIn("exceeds threshold", result)
@@ -898,9 +900,11 @@ def test_sql_prettify_max_length_disabled(self):
898900
"""
899901
from debug_toolbar.panels.sql.utils import reformat_sql
900902

901-
long_sql = "SELECT * FROM auth_user WHERE id IN (" + ", ".join(
902-
[f"'{i}'" for i in range(100)]
903-
) + ")"
903+
long_sql = (
904+
"SELECT * FROM auth_user WHERE id IN ("
905+
+ ", ".join([f"'{i}'" for i in range(100)])
906+
+ ")"
907+
)
904908

905909
with override_settings(
906910
DEBUG_TOOLBAR_CONFIG={"SQL_PRETTIFY_MAX_LENGTH": 0, "PRETTIFY_SQL": True}

0 commit comments

Comments
 (0)