Skip to content

Commit 145a955

Browse files
committed
feat: SP-1415 remove match statement
1 parent 02ba54d commit 145a955

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/scanoss/results.py

+6-7
Original file line numberDiff line numberDiff line change
@@ -169,13 +169,12 @@ def present(self, output_format: str = None, output_file: str = None):
169169
f"ERROR: Invalid output format '{output_format}'. Valid values are: {', '.join(AVAILABLE_OUTPUT_FORMATS)}"
170170
)
171171

172-
match fmt:
173-
case "json":
174-
return self._present_json(file_path)
175-
case "plain":
176-
return self._present_plain(file_path)
177-
case _:
178-
return self._present_stdout()
172+
if fmt == "json":
173+
return self._present_json(file_path)
174+
elif fmt == "plain":
175+
return self._present_plain(file_path)
176+
else:
177+
return self._present_stdout()
179178

180179
def _present_json(self, file: str = None):
181180
if not file:

0 commit comments

Comments
 (0)