Skip to content

Commit c7f9da1

Browse files
committed
Fix checks
Blacken code and tell mypy to skip typer
1 parent 2866a12 commit c7f9da1

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

mypy.ini

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,6 @@ strict_equality = True
77

88
[mypy-stringcase]
99
ignore_missing_imports = True
10+
11+
[mypy-typer]
12+
ignore_missing_imports = True

openapi_python_client/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def cli() -> None:
1717
@app.command()
1818
def generate(
1919
url: Optional[str] = typer.Option(None, help="A URL to read the JSON from"),
20-
path: Optional[pathlib.Path] = typer.Option(None, help="A path to the JSON file")
20+
path: Optional[pathlib.Path] = typer.Option(None, help="A path to the JSON file"),
2121
) -> None:
2222
""" Generate a new OpenAPI Client library """
2323
if not url and not path:

tests/test_cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
def test_generate_no_params(mocker):
66
main = mocker.patch("openapi_python_client.cli.main")
77
from openapi_python_client.cli import generate
8+
89
with pytest.raises(typer.Exit) as exc_info:
910
generate()
1011
assert exc_info.value.exit_code == 1
@@ -14,6 +15,7 @@ def test_generate_no_params(mocker):
1415
def test_generate_url_and_path(mocker):
1516
main = mocker.patch("openapi_python_client.cli.main")
1617
from openapi_python_client.cli import generate
18+
1719
with pytest.raises(typer.Exit) as exc_info:
1820
generate(url="blah", path="other_blah")
1921
assert exc_info.value.exit_code == 1

0 commit comments

Comments
 (0)