Black all files

This commit is contained in:
David-Wobrock authored and David Wobrock committed 2018-12-30 11:56:21 +01:00
1 parent 03bd7753e5
commit f05b199925
6 files changed
+231 -233

No files matched your search

+3 -4
View File
@@ -23,8 +23,7 @@ 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))
@@ -33,14 +32,14 @@ class Cache(dict):
def load(self):
try:
with open(self.filename, 'rb') as f:
with open(self.filename, "rb") as f:
tmp_dict = pickle.load(f)
self.update(tmp_dict)
except IOError:
pass
def save(self):
with open(self.filename, 'wb') as f:
with open(self.filename, "wb") as f:
pickle.dump(self, f, protocol=2)
def md5(self, app_name, migration):