diff options
| author | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2024-01-26 12:45:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-01-26 12:45:07 +0100 |
| commit | 305757aec19c9d5111e4d76095ae0acd66163e4b (patch) | |
| tree | 04aa017e66c06b3b19cb466ed4e1d73cd871523d /tests/schema/tests.py | |
| parent | 3f6d939c62efd967f548c27a265748cc2cc47ca5 (diff) | |
Applied Black's 2024 stable style.
https://github.com/psf/black/releases/tag/24.1.0
Diffstat (limited to 'tests/schema/tests.py')
| -rw-r--r-- | tests/schema/tests.py | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/tests/schema/tests.py b/tests/schema/tests.py index 61244f75b4..3a026281bd 100644 --- a/tests/schema/tests.py +++ b/tests/schema/tests.py @@ -640,9 +640,10 @@ class SchemaTests(TransactionTestCase): # Add the new field new_field = IntegerField(null=True) new_field.set_attributes_from_name("age") - with CaptureQueriesContext( - connection - ) as ctx, connection.schema_editor() as editor: + with ( + CaptureQueriesContext(connection) as ctx, + connection.schema_editor() as editor, + ): editor.add_field(Author, new_field) drop_default_sql = editor.sql_alter_column_no_default % { "column": editor.quote_name(new_field.name), @@ -2483,9 +2484,10 @@ class SchemaTests(TransactionTestCase): with self.assertRaises(DatabaseError): self.column_classes(new_field.remote_field.through) # Add the field - with CaptureQueriesContext( - connection - ) as ctx, connection.schema_editor() as editor: + with ( + CaptureQueriesContext(connection) as ctx, + connection.schema_editor() as editor, + ): editor.add_field(LocalAuthorWithM2M, new_field) # Table is not rebuilt. self.assertEqual( @@ -2963,9 +2965,11 @@ class SchemaTests(TransactionTestCase): ) # Redundant foreign key index is not added. self.assertEqual( - len(old_constraints) - 1 - if connection.features.supports_partial_indexes - else len(old_constraints), + ( + len(old_constraints) - 1 + if connection.features.supports_partial_indexes + else len(old_constraints) + ), len(new_constraints), ) |
