Browse Source

add new changes.

pull/15218/head
hastinstagline 4 months ago
parent
commit
d709db3171
  1. 2
      fastapi/__main__.py
  2. 7
      fastapi/exceptions.py
  3. 11
      fastapi/param_functions.py
  4. 11
      fastapi/requests.py

2
fastapi/__main__.py

@ -1,3 +1,5 @@
#main
from fastapi.cli import main from fastapi.cli import main
main() main()

7
fastapi/exceptions.py

@ -14,6 +14,13 @@ class EndpointContext(TypedDict, total=False):
line: int line: int
class HTTPException(StarletteHTTPException): class HTTPException(StarletteHTTPException):
""" """
An HTTP exception you can raise in your own code to show errors to the client. An HTTP exception you can raise in your own code to show errors to the client.

11
fastapi/param_functions.py

@ -46,6 +46,15 @@ def Path( # noqa: N802
""" """
), ),
] = None, ] = None,
alias_priority: Annotated[
int | None,
Doc(
"""
Priority of the alias. This affects whether an alias generator is used.
"""
),
] = _Unset,
alias_priority: Annotated[ alias_priority: Annotated[
int | None, int | None,
Doc( Doc(
@ -92,6 +101,8 @@ def Path( # noqa: N802
""" """
), ),
] = None, ] = None,
gt: Annotated[ gt: Annotated[
float | None, float | None,
Doc( Doc(

11
fastapi/requests.py

@ -1,2 +1,11 @@
from starlette.requests import HTTPConnection as HTTPConnection # noqa: F401 from starlette.requests import HTTPConnection as HTTPConnection # noqa: F401
from starlette.requests import Request as Request # noqa: F401 from starlette.requests import Request as Request # noqa: F401f
from starlette.requests import HTTPConnection as HTTPConnection # noqa: F401
from starlette.requests import Request as Request # noqa: F401f
from starlette.requests import HTTPConnection as HTTPConnection # noqa: F401
from starlette.requests import Request as Request # noqa: F401f

Loading…
Cancel
Save