From c5cd8783825b5f6384417dac5f3889b4210b7d08 Mon Sep 17 00:00:00 2001 From: Mariusz Felisiak Date: Thu, 3 Feb 2022 11:20:46 +0100 Subject: Refs #33476 -- Refactored problematic code before reformatting by Black. In these cases Black produces unexpected results, e.g. def make_random_password( self, length=10, allowed_chars='abcdefghjkmnpqrstuvwxyz' 'ABCDEFGHJKLMNPQRSTUVWXYZ' '23456789', ): or cursor.execute(""" SELECT ... """, [table name], ) --- tests/shell/tests.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'tests/shell') diff --git a/tests/shell/tests.py b/tests/shell/tests.py index df32562f6b..aadd618109 100644 --- a/tests/shell/tests.py +++ b/tests/shell/tests.py @@ -11,10 +11,7 @@ from django.test.utils import captured_stdin, captured_stdout class ShellCommandTestCase(SimpleTestCase): script_globals = 'print("__name__" in globals())' script_with_inline_function = ( - 'import django\n' - 'def f():\n' - ' print(django.__version__)\n' - 'f()' + 'import django\ndef f():\n print(django.__version__)\nf()' ) def test_command_option(self): -- cgit v1.2.1