Skip to content

Commit 78fe1d7

Browse files
billyrrrtschaume
andcommitted
Pep8
Co-authored-by: tschaume <[email protected]>
1 parent 4eb1af5 commit 78fe1d7

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

flasgger/base.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -255,17 +255,17 @@ def load_swagger_file(self, filename):
255255
if filename.endswith('.json'):
256256
loader = json.load
257257
elif filename.endswith('.yml') or filename.endswith('.yaml'):
258-
loader = lambda stream: \
259-
yaml.safe_load(parse_imports(stream.read(), filename))
258+
def loader(stream):
259+
return yaml.safe_load(parse_imports(stream.read(), filename))
260260
else:
261261
with codecs.open(filename, 'r', 'utf-8') as f:
262262
contents = f.read()
263263
contents = contents.strip()
264264
if contents[0] in ['{', '[']:
265265
loader = json.load
266266
else:
267-
loader = lambda stream: \
268-
yaml.safe_load(parse_imports(stream.read(), filename))
267+
def loader(stream):
268+
return yaml.safe_load(parse_imports(stream.read(), filename))
269269
with codecs.open(filename, 'r', 'utf-8') as f:
270270
return loader(f)
271271

requirements-dev.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ marshmallow
33
apispec>=1.0.0b5
44
apispec-webframeworks
55
flask-restful
6-
pep8==1.5.7
7-
flake8==2.4.1
6+
pep8==1.7.1
7+
flake8==3.8.4
88
pytest>=4.6
99
flex
1010
coveralls

0 commit comments

Comments
 (0)