Skip to content

Commit a925c18

Browse files
Correct formatting
1 parent 3f4a5c2 commit a925c18

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

openapidocs/utils/source.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,23 +76,23 @@ def read_from_source(source: str, cwd: Path = None):
7676
potential_paths.append(cwd / source)
7777

7878
for source_path in potential_paths:
79-
if source_path.exists():
80-
if not source_path.is_file():
81-
raise ValueError("The given path is not a file path.")
79+
if source_path.exists():
80+
if not source_path.is_file():
81+
raise ValueError("The given path is not a file path.")
8282

83-
logger.debug("Reading from file %s", source)
83+
logger.debug("Reading from file %s", source)
8484

85-
file_path = source.lower()
85+
file_path = source.lower()
8686

87-
if file_path.endswith(".json"):
88-
return read_from_json_file(source_path)
87+
if file_path.endswith(".json"):
88+
return read_from_json_file(source_path)
8989

90-
if file_path.endswith(".yaml") or file_path.endswith(".yml"):
91-
return read_from_yaml_file(source_path)
92-
else:
93-
raise ValueError("Unsupported source file.")
94-
else:
95-
logger.debug("Path %s does not exist, trying next.", source)
90+
if file_path.endswith(".yaml") or file_path.endswith(".yml"):
91+
return read_from_yaml_file(source_path)
92+
else:
93+
raise ValueError("Unsupported source file.")
94+
else:
95+
logger.debug("Path %s does not exist, trying next.", source)
9696

9797
source_lower = source.lower()
9898

0 commit comments

Comments
 (0)