Move constants to specific file and remove unused import
This commit is contained in:
1 parent
e49f6dea9c
commit
1925343f4a
2 files changed
+4
-5
No files matched your search
@@ -3,3 +3,6 @@ from appdirs import user_cache_dir
|
||||
__version__ = "1.5.0"
|
||||
|
||||
DEFAULT_CACHE_PATH = user_cache_dir("django-migration-linter", version=__version__)
|
||||
|
||||
DJANGO_APPS_WITH_MIGRATIONS = ("admin", "auth", "contenttypes", "sessions")
|
||||
EXPECTED_DATA_MIGRATION_ARGS = ("apps", "schema_editor")
|
||||
@@ -5,7 +5,6 @@ import inspect
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
from collections import defaultdict
|
||||
from subprocess import Popen, PIPE
|
||||
|
||||
from django.conf import settings
|
||||
@@ -14,16 +13,13 @@ from django.db import DEFAULT_DB_ALIAS, connections, ProgrammingError, migration
|
||||
from enum import Enum, unique
|
||||
|
||||
from .cache import Cache
|
||||
from .constants import DEFAULT_CACHE_PATH
|
||||
from .constants import DEFAULT_CACHE_PATH, EXPECTED_DATA_MIGRATION_ARGS, DJANGO_APPS_WITH_MIGRATIONS
|
||||
from .utils import clean_bytes_to_str, get_migration_abspath, split_migration_path
|
||||
from .operations import IgnoreMigration
|
||||
from .sql_analyser import analyse_sql_statements
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
DJANGO_APPS_WITH_MIGRATIONS = ("admin", "auth", "contenttypes", "sessions")
|
||||
EXPECTED_DATA_MIGRATION_ARGS = ("apps", "schema_editor")
|
||||
|
||||
|
||||
@unique
|
||||
class MessageType(Enum):
|
||||
|
||||
Reference in new issue
Block a user