You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

14 line
418 B

  1. try:
  2. from fastapi_cli.cli import main as cli_main
  3. except ImportError: # pragma: no cover
  4. cli_main = None # type: ignore
  5. def main() -> None:
  6. if not cli_main: # type: ignore[truthy-function]
  7. message = 'To use the fastapi command, please install "fastapi[standard]":\n\n\tpip install "fastapi[standard]"\n'
  8. print(message)
  9. raise RuntimeError(message) # noqa: B904
  10. cli_main()