- Sort Score
- Num 10 results
- Language All
Results 1 - 10 of 833 for DEF (0.02 seconds)
-
build-logic/build-update-utils/src/test/groovy/gradlebuild/buildutils/tasks/UpdateReleasedVersionsTest.groovy
def format = new SimpleDateFormat('yyyyMMddHHmmssZ') def setup() { format.timeZone = TimeZone.getTimeZone("UTC") } def "final release is added to list"() { def snapshot = snapshot('4.3') def rc = releasedVersion('4.3-rc-1') def versions = releasedVersions(snapshot, rc, []) def version = new ReleasedVersion('4.2', '20170913122310+0000')Created: Wed Apr 01 11:36:16 GMT 2026 - Last Modified: Mon Mar 23 14:47:12 GMT 2026 - 5.4K bytes - Click Count (0) -
tests/benchmarks/test_general_performance.py
@app.post("/sync/validated", response_model=ItemOut) def sync_validated(item: ItemIn, dep: Annotated[int, Depends(dep_b)]): return ItemOut(name=item.name, value=item.value, dep=dep) @app.get("/sync/dict-no-response-model") def sync_dict_no_response_model(): return {"name": "foo", "value": 123} @app.get("/sync/dict-with-response-model", response_model=ItemOut) def sync_dict_with_response_model(
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Fri Dec 26 20:40:26 GMT 2025 - 11.1K bytes - Click Count (0) -
tests/test_dependency_class.py
class CallableDependency: def __call__(self, value: str) -> str: return value class CallableGenDependency: def __call__(self, value: str) -> Generator[str, None, None]: yield value class AsyncCallableDependency: async def __call__(self, value: str) -> str: return value class AsyncCallableGenDependency:Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 4.4K bytes - Click Count (0) -
tests/test_response_dependency.py
from fastapi.testclient import TestClient def test_response_with_depends_annotated(): """Response type hint should work with Annotated[Response, Depends(...)].""" app = FastAPI() def modify_response(response: Response) -> Response: response.headers["X-Custom"] = "modified" return response @app.get("/") def endpoint(response: Annotated[Response, Depends(modify_response)]):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Thu Feb 05 18:23:16 GMT 2026 - 5.2K bytes - Click Count (0) -
build-logic/build-update-utils/src/test/groovy/gradlebuild/buildutils/tasks/UpdateKotlinVersionsTest.groovy
Created: Wed Apr 01 11:36:16 GMT 2026 - Last Modified: Wed Oct 29 08:29:55 GMT 2025 - 3.1K bytes - Click Count (0) -
tests/test_request_params/test_form/test_optional_list.py
@app.post("/optional-list-str", operation_id="optional_list_str") async def read_optional_list_str( p: Annotated[list[str] | None, Form()] = None, ): return {"p": p} class FormModelOptionalListStr(BaseModel): p: list[str] | None = None @app.post("/model-optional-list-str", operation_id="model_optional_list_str") async def read_model_optional_list_str(p: Annotated[FormModelOptionalListStr, Form()]):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 9.9K bytes - Click Count (0) -
tests/main.py
def get_str_id(item_id: str): return item_id @app.get("/path/int/{item_id}") def get_int_id(item_id: int): return item_id @app.get("/path/float/{item_id}") def get_float_id(item_id: float): return item_id @app.get("/path/bool/{item_id}") def get_bool_id(item_id: bool): return item_id @app.get("/path/param/{item_id}") def get_path_param_id(item_id: str | None = Path()):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 4.5K bytes - Click Count (0) -
tests/test_params_repr.py
test_data: list[Any] = ["teststr", None, ..., 1, []] def get_user(): return {} # pragma: no cover def test_param_repr_str(): assert repr(Param("teststr")) == "Param(teststr)" def test_param_repr_none(): assert repr(Param(None)) == "Param(None)" def test_param_repr_ellipsis(): assert repr(Param(...)) == "Param(PydanticUndefined)" def test_param_repr_number():
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Sat Dec 27 18:19:10 GMT 2025 - 2.3K bytes - Click Count (0) -
tests/test_dependency_contextmanager.py
async def context_b(state: dict = Depends(context_a)): state["context_b"] = "started b" try: yield state finally: state["context_b"] = f"finished b with a: {state['context_a']}" @app.get("/async") async def get_async(state: str = Depends(asyncgen_state)): return state @app.get("/sync") async def get_sync(state: str = Depends(generator_state)):
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Wed Dec 17 21:25:59 GMT 2025 - 11.5K bytes - Click Count (0) -
tests/test_router_events.py
def app_startup() -> None: state.app_startup = True @app.on_event("shutdown") def app_shutdown() -> None: state.app_shutdown = True router = APIRouter() @router.on_event("startup") def router_startup() -> None: state.router_startup = True @router.on_event("shutdown") def router_shutdown() -> None: state.router_shutdown = True
Created: Sun Apr 05 07:19:11 GMT 2026 - Last Modified: Tue Feb 17 09:59:14 GMT 2026 - 11.7K bytes - Click Count (0)