mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Format project with black (#467)
Format with line length 110 to match flake8 make black part of linting check Update travis spec for updated black requirements Add diff output for black on failure update changelog
This commit is contained in:
@@ -5,14 +5,13 @@ from ..serialize import serialize, deserialize
|
||||
|
||||
|
||||
class FilesystemPersister(object):
|
||||
|
||||
@classmethod
|
||||
def load_cassette(cls, cassette_path, serializer):
|
||||
try:
|
||||
with open(cassette_path) as f:
|
||||
cassette_content = f.read()
|
||||
except IOError:
|
||||
raise ValueError('Cassette not found.')
|
||||
raise ValueError("Cassette not found.")
|
||||
cassette = deserialize(cassette_content, serializer)
|
||||
return cassette
|
||||
|
||||
@@ -22,5 +21,5 @@ class FilesystemPersister(object):
|
||||
dirname, filename = os.path.split(cassette_path)
|
||||
if dirname and not os.path.exists(dirname):
|
||||
os.makedirs(dirname)
|
||||
with open(cassette_path, 'w') as f:
|
||||
with open(cassette_path, "w") as f:
|
||||
f.write(data)
|
||||
|
||||
Reference in New Issue
Block a user