File tree 11 files changed +20
-19
lines changed
src/django_linear_migrations
11 files changed +20
-19
lines changed Original file line number Diff line number Diff line change @@ -47,16 +47,11 @@ repos:
47
47
- id : blacken-docs
48
48
additional_dependencies :
49
49
- black==23.1.0
50
- - repo : https://github.com/asottile/reorder-python-imports
51
- rev : v3.12.0
50
+ - repo : https://github.com/pycqa/isort
51
+ rev : 5.13.2
52
52
hooks :
53
- - id : reorder-python-imports
54
- args :
55
- - --py38-plus
56
- - --application-directories
57
- - .:example:src
58
- - --add-import
59
- - ' from __future__ import annotations'
53
+ - id : isort
54
+ name : isort (python)
60
55
- repo : https://github.com/PyCQA/flake8
61
56
rev : 7.0.0
62
57
hooks :
Original file line number Diff line number Diff line change @@ -46,6 +46,13 @@ Repository = "https://github.com/adamchainz/django-linear-migrations"
46
46
[tool .black ]
47
47
target-version = [' py38' ]
48
48
49
+ [tool .isort ]
50
+ add_imports = [
51
+ " from __future__ import annotations"
52
+ ]
53
+ force_single_line = true
54
+ profile = " black"
55
+
49
56
[tool .pytest .ini_options ]
50
57
addopts = """ \
51
58
--strict-config
Original file line number Diff line number Diff line change 13
13
from django .apps import apps
14
14
from django .conf import settings
15
15
from django .core .checks import Error
16
- from django .core .checks import register
17
16
from django .core .checks import Tags
17
+ from django .core .checks import register
18
18
from django .core .signals import setting_changed
19
19
from django .db .migrations .loader import MigrationLoader
20
20
from django .dispatch import receiver
Original file line number Diff line number Diff line change 5
5
import sys
6
6
from typing import no_type_check
7
7
8
-
9
8
if sys .version_info >= (3 , 9 ):
10
9
ast_unparse = ast .unparse
11
10
else :
Original file line number Diff line number Diff line change 8
8
from django .core .management .commands .makemigrations import Command as BaseCommand
9
9
from django .db .migrations .loader import MigrationLoader
10
10
11
+ from django_linear_migrations .apps import MigrationDetails
11
12
from django_linear_migrations .apps import first_party_app_configs
12
13
from django_linear_migrations .apps import get_graph_plan
13
- from django_linear_migrations .apps import MigrationDetails
14
14
15
15
16
16
class Command (BaseCommand ):
Original file line number Diff line number Diff line change 4
4
from django .core .management .commands .makemigrations import Command as BaseCommand
5
5
from django .db .migrations import Migration
6
6
7
- from django_linear_migrations .apps import first_party_app_configs
8
7
from django_linear_migrations .apps import MigrationDetails
8
+ from django_linear_migrations .apps import first_party_app_configs
9
9
10
10
11
11
class Command (BaseCommand ):
Original file line number Diff line number Diff line change 11
11
from django .apps import apps
12
12
from django .core .management import BaseCommand
13
13
from django .core .management import CommandError
14
- from django .db import connections
15
14
from django .db import DatabaseError
15
+ from django .db import connections
16
16
from django .db .migrations .recorder import MigrationRecorder
17
17
18
- from django_linear_migrations .apps import is_first_party_app_config
19
18
from django_linear_migrations .apps import MigrationDetails
19
+ from django_linear_migrations .apps import is_first_party_app_config
20
20
from django_linear_migrations .compat import ast_unparse
21
21
22
22
Original file line number Diff line number Diff line change 5
5
from textwrap import dedent
6
6
7
7
import pytest
8
- from django .test import override_settings
9
8
from django .test import TestCase
9
+ from django .test import override_settings
10
10
11
11
from django_linear_migrations .apps import check_max_migration_files
12
12
from tests .utils import empty_migration
Original file line number Diff line number Diff line change 7
7
8
8
import pytest
9
9
from django .core .management import call_command
10
- from django .test import override_settings
11
10
from django .test import TestCase
11
+ from django .test import override_settings
12
12
13
13
from tests .utils import empty_migration
14
14
Original file line number Diff line number Diff line change 9
9
import django
10
10
import pytest
11
11
from django .db import models
12
- from django .test import override_settings
13
12
from django .test import TestCase
13
+ from django .test import override_settings
14
14
15
15
from tests .utils import run_command
16
16
Original file line number Diff line number Diff line change 12
12
from django .core .management import CommandError
13
13
from django .db import connection
14
14
from django .db .migrations .recorder import MigrationRecorder
15
- from django .test import override_settings
16
15
from django .test import SimpleTestCase
17
16
from django .test import TestCase
17
+ from django .test import override_settings
18
18
19
19
from django_linear_migrations .management .commands import rebase_migration as module
20
20
from tests .utils import empty_migration
You can’t perform that action at this time.
0 commit comments