File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ def _read_pyproject_toml(cls) -> dict[str, Any]:
2222 import tomllib # type: ignore[import-not-found, unused-ignore] # ty: ignore[unresolved-import]
2323 except ImportError :
2424 try :
25- import tomli as tomllib # type: ignore
25+ import tomli as tomllib # type: ignore[no-redef, import-not-found, unused-ignore]
2626 except ImportError : # pragma: no cover
2727 logger .debug ("tomli not available, skipping pyproject.toml" )
2828 return {}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ def test_no_uvicorn() -> None:
1818
1919 import fastapi_cli .cli
2020
21- fastapi_cli .cli .uvicorn = None # type: ignore[attr-defined, assignment]
21+ fastapi_cli .cli .uvicorn = None # type: ignore[attr-defined, assignment] # ty: ignore[invalid-assignment]
2222
2323 with changing_dir (assets_path ):
2424 result = runner .invoke (fastapi_cli .cli .app , ["dev" , "single_file_app.py" ])
@@ -29,15 +29,15 @@ def test_no_uvicorn() -> None:
2929 in result .exception .args [0 ]
3030 )
3131
32- fastapi_cli .cli .uvicorn = uvicorn # type: ignore[attr-defined]
32+ fastapi_cli .cli .uvicorn = uvicorn # type: ignore[attr-defined] # ty: ignore[invalid-assignment]
3333
3434
3535def test_no_fastapi () -> None :
3636 from fastapi import FastAPI
3737
3838 import fastapi_cli .discover
3939
40- fastapi_cli .discover .FastAPI = None # type: ignore[attr-defined, assignment]
40+ fastapi_cli .discover .FastAPI = None # type: ignore[attr-defined, assignment] # ty: ignore[invalid-assignment]
4141 with changing_dir (assets_path ):
4242 with pytest .raises (FastAPICLIException ) as exc_info :
4343 get_import_data (path = Path ("single_file_app.py" ))
You can’t perform that action at this time.
0 commit comments