Changed code to support older Python versions
This commit is contained in:
parent
eb92d2d36f
commit
582458cdd0
5027 changed files with 794942 additions and 4 deletions
13
venv/lib/python3.11/site-packages/fastapi/cli.py
Normal file
13
venv/lib/python3.11/site-packages/fastapi/cli.py
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
try:
|
||||
from fastapi_cli.cli import main as cli_main
|
||||
|
||||
except ImportError: # pragma: no cover
|
||||
cli_main = None # type: ignore
|
||||
|
||||
|
||||
def main() -> None:
|
||||
if not cli_main: # type: ignore[truthy-function]
|
||||
message = 'To use the fastapi command, please install "fastapi[standard]":\n\n\tpip install "fastapi[standard]"\n'
|
||||
print(message)
|
||||
raise RuntimeError(message) # noqa: B904
|
||||
cli_main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue