Fix flake8
This commit is contained in:
3 files changed
+6
-6
No files matched your search
@@ -23,7 +23,8 @@ class Cache(dict):
|
|||||||
def __init__(self, django_folder, cache_path):
|
def __init__(self, django_folder, cache_path):
|
||||||
self.django_folder = django_folder
|
self.django_folder = django_folder
|
||||||
project_name = split_path(django_folder)[-2]
|
project_name = split_path(django_folder)[-2]
|
||||||
self.filename = os.path.join(cache_path, '{0}.pickle'.format(project_name))
|
self.filename = \
|
||||||
|
os.path.join(cache_path, '{0}.pickle'.format(project_name))
|
||||||
|
|
||||||
if not os.path.exists(os.path.dirname(self.filename)):
|
if not os.path.exists(os.path.dirname(self.filename)):
|
||||||
os.makedirs(os.path.dirname(self.filename))
|
os.makedirs(os.path.dirname(self.filename))
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ from subprocess import Popen, PIPE
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
from django_migration_linter.cache import Cache
|
from django_migration_linter.cache import Cache
|
||||||
from django_migration_linter.constants import DEFAULT_CACHE_PATH, MIGRATION_FOLDER_NAME
|
from django_migration_linter.constants import DEFAULT_CACHE_PATH, \
|
||||||
|
MIGRATION_FOLDER_NAME
|
||||||
from django_migration_linter.utils import split_migration_path
|
from django_migration_linter.utils import split_migration_path
|
||||||
from . import utils
|
from . import utils
|
||||||
from .sql_analyser import analyse_sql_statements
|
from .sql_analyser import analyse_sql_statements
|
||||||
@@ -289,7 +290,8 @@ def _main():
|
|||||||
cache_group.add_argument(
|
cache_group.add_argument(
|
||||||
'--cache-path',
|
'--cache-path',
|
||||||
type=str,
|
type=str,
|
||||||
help='specify a directory that should be used to store cache-files in.')
|
help='specify a directory that should be used to'
|
||||||
|
'store cache-files in.')
|
||||||
cache_group.add_argument(
|
cache_group.add_argument(
|
||||||
'--no-cache',
|
'--no-cache',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
|
|||||||
@@ -74,6 +74,3 @@ def compose_migration_path(django_folder, app_name, migration):
|
|||||||
|
|
||||||
def clean_bytes_to_str(byte_input):
|
def clean_bytes_to_str(byte_input):
|
||||||
return byte_input.decode('utf-8').strip()
|
return byte_input.decode('utf-8').strip()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Reference in new issue
Block a user