Skip to content

Commit e578ed7

Browse files
committed
Change raise -> elif to raise -> if
1 parent 754d50a commit e578ed7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

openapi_python_client/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ def _get_json(*, url: Optional[str], path: Optional[Path]) -> Dict[str, Any]:
5959
json_bytes: bytes
6060
if url is not None and path is not None:
6161
raise ValueError("Provide URL or Path, not both.")
62-
elif url is not None:
62+
if url is not None:
6363
response = httpx.get(url)
6464
json_bytes = response.content
6565
elif path is not None:

openapi_python_client/cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def generate(
8484
if not url and not path:
8585
typer.secho("You must either provide --url or --path", fg=typer.colors.RED)
8686
raise typer.Exit(code=1)
87-
elif url and path:
87+
if url and path:
8888
typer.secho("Provide either --url or --path, not both", fg=typer.colors.RED)
8989
raise typer.Exit(code=1)
9090
with handle_errors():
@@ -102,7 +102,7 @@ def update(
102102
if not url and not path:
103103
typer.secho("You must either provide --url or --path", fg=typer.colors.RED)
104104
raise typer.Exit(code=1)
105-
elif url and path:
105+
if url and path:
106106
typer.secho("Provide either --url or --path, not both", fg=typer.colors.RED)
107107
raise typer.Exit(code=1)
108108
with handle_errors():

0 commit comments

Comments
 (0)