Skip to content

Commit c760f13

Browse files
committed
Made code files PEP8 conformant
Code files have been made PEP8 conformant by the use of autopep8 code formatter tool. This is done in order to facilitate future use and in check with standard code styles i.e. PEP8.
1 parent 35ea1dc commit c760f13

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

openapi_parser.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,8 @@ def check_for_ref(global_: Dict[str, Any],
294294
split('/')
295295
except KeyError:
296296
class_location = \
297-
block["responses"][obj]["schema"]["items"]["$ref"].\
298-
split('/')
297+
block["responses"][obj]["schema"]["items"]["$ref"].\
298+
split('/')
299299
collection = check_collection(
300300
schema_obj=block["responses"][obj]["schema"],
301301
method=path)
@@ -382,7 +382,8 @@ def get_parameters(global_: Dict[str, Any],
382382
# check if class has been pared
383383
if parameter["schema"]["$ref"].split(
384384
'/')[2] in global_["class_names"]:
385-
param = "vocab:{}".format(parameter["schema"]["$ref"].split('/')[2])
385+
param = "vocab:{}".format(
386+
parameter["schema"]["$ref"].split('/')[2])
386387

387388
else:
388389
# if not go to that location and parse and add
@@ -392,7 +393,8 @@ def get_parameters(global_: Dict[str, Any],
392393
parameter["schema"]["$ref"]),
393394
parameter["schema"]["$ref"].split('/')[2],
394395
path=path)
395-
param = "vocab:{}".format(parameter["schema"]["$ref"].split('/')[2])
396+
param = "vocab:{}".format(
397+
parameter["schema"]["$ref"].split('/')[2])
396398
except KeyError:
397399
param = ""
398400

@@ -487,7 +489,8 @@ def parse(doc: Dict[str, Any]) -> Dict[str, Any]:
487489
baseURL = try_catch_replacement(doc, "host", "localhost")
488490
name = try_catch_replacement(doc, "basePath", "api")
489491
schemes = try_catch_replacement(doc, "schemes", "http")
490-
api_doc = HydraDoc(name, title, desc, name, "{}://{}".format(schemes[0],baseURL))
492+
api_doc = HydraDoc(name, title, desc, name,
493+
"{}://{}".format(schemes[0], baseURL))
491494
get_paths(global_)
492495
for name in global_["class_names"]:
493496
for prop in global_[name]["prop_definition"]:

0 commit comments

Comments
 (0)