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