Coverage for fastapi / cli.py: 100%
8 statements
« prev ^ index » next coverage.py v7.13.3, created at 2026-04-06 01:24 +0000
« prev ^ index » next coverage.py v7.13.3, created at 2026-04-06 01:24 +0000
1try: 1abcd
2 from fastapi_cli.cli import main as cli_main 1abcd
4except ImportError: # pragma: no cover
5 cli_main = None # type: ignore
8def main() -> None: 1abcd
9 if not cli_main: # type: ignore[truthy-function] 1aebfcgdh
10 message = 'To use the fastapi command, please install "fastapi[standard]":\n\n\tpip install "fastapi[standard]"\n' 1efgh
11 print(message) 1efgh
12 raise RuntimeError(message) # noqa: B904 1efgh
13 cli_main() 1abcd