Skip to content

Commit 63bd813

Browse files
committed
Fix ruff checks
1 parent 13bd892 commit 63bd813

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def setup_terminal() -> None:
2424

2525

2626
@pytest.fixture(autouse=True)
27-
def reset_imports():
27+
def reset_imports() -> Generator[None, None, None]:
2828
modules = sys.modules.copy()
2929
try:
3030
yield

tests/test_cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515

1616
@pytest.fixture(autouse=True)
17-
def assets(monkeypatch: pytest.MonkeyPatch):
17+
def assets(monkeypatch: pytest.MonkeyPatch) -> None:
1818
monkeypatch.chdir(assets_path)
1919

2020

tests/test_utils_default_dir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_app_dir_main(
4242
assert f"Using import string app.{prog_name}:app" in captured.out
4343

4444

45-
def test_app_dir_non_default(monkeypatch) -> None:
45+
def test_app_dir_non_default(monkeypatch: pytest.MonkeyPatch) -> None:
4646
monkeypatch.chdir(assets_path / "default_files" / "default_app_dir_non_default")
4747
with pytest.raises(FastAPICLIException) as e:
4848
get_import_string()

tests/test_utils_package.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from pathlib import Path
2+
from typing import Optional, Union
23

34
import pytest
45
from fastapi_cli.discover import get_import_string
@@ -33,10 +34,10 @@
3334
],
3435
)
3536
def test_package_mod_init_inside(
36-
chdir_path,
37-
import_path,
38-
app_name,
39-
expect_import_string,
37+
chdir_path: str,
38+
import_path: Union[Path, str],
39+
app_name: Optional[str],
40+
expect_import_string: str,
4041
monkeypatch: pytest.MonkeyPatch,
4142
capsys: CaptureFixture[str],
4243
) -> None:

0 commit comments

Comments
 (0)