Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ github-actions = [
tests = [
"coverage[toml]>=6.2,<8.0",
"fastapi>=0.128.0",
"mypy==2.3.0",
"mypy==2.3.1",
"pytest>=7.4.0,<10.0.0",
"ruff>=0.15.15",
"uvicorn>=0.39.0",
Expand Down
2 changes: 1 addition & 1 deletion src/fastapi_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
try:
import uvicorn
except ImportError: # pragma: no cover
uvicorn = None # type: ignore[assignment] # ty: ignore[invalid-assignment]
uvicorn = None # type: ignore[assignment]


try:
Expand Down
2 changes: 1 addition & 1 deletion src/fastapi_cli/discover.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
try:
from fastapi import FastAPI
except ImportError: # pragma: no cover
FastAPI = None # type: ignore[misc, assignment] # ty: ignore[invalid-assignment]
FastAPI = None # type: ignore[misc, assignment]


def get_default_path() -> Path:
Expand Down
4 changes: 2 additions & 2 deletions tests/test_requirements.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_no_uvicorn() -> None:

import fastapi_cli.cli

fastapi_cli.cli.uvicorn = None # type: ignore[attr-defined, assignment] # ty: ignore[invalid-assignment]
fastapi_cli.cli.uvicorn = None # type: ignore[attr-defined, assignment]

with changing_dir(assets_path):
result = runner.invoke(fastapi_cli.cli.app, ["dev", "single_file_app.py"])
Expand All @@ -37,7 +37,7 @@ def test_no_fastapi() -> None:

import fastapi_cli.discover

fastapi_cli.discover.FastAPI = None # type: ignore[attr-defined, assignment] # ty: ignore[invalid-assignment]
fastapi_cli.discover.FastAPI = None # type: ignore[attr-defined, assignment]
with changing_dir(assets_path):
with pytest.raises(FastAPICLIException) as exc_info:
get_import_data(path=Path("single_file_app.py"))
Expand Down
Loading