Fix flake8

This commit is contained in:
Felix committed 2018-12-20 14:53:25 +01:00
1 parent b68c0183bb
commit f351b71d6a
3 files changed
+6 -6

No files matched your search

+2 -1
View File
@@ -23,7 +23,8 @@ class Cache(dict):
def __init__(self, django_folder, cache_path):
self.django_folder = django_folder
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)):
os.makedirs(os.path.dirname(self.filename))
+4 -2
View File
@@ -20,7 +20,8 @@ from subprocess import Popen, PIPE
import sys
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 . import utils
from .sql_analyser import analyse_sql_statements
@@ -289,7 +290,8 @@ def _main():
cache_group.add_argument(
'--cache-path',
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(
'--no-cache',
action='store_true',
-3
View File
@@ -74,6 +74,3 @@ def compose_migration_path(django_folder, app_name, migration):
def clean_bytes_to_str(byte_input):
return byte_input.decode('utf-8').strip()