- Sort Score
- Result 10 results
- Languages All
Results 1 - 10 of 171 for def (0.07 sec)
-
tests/test_dependency_wrapped.py
else: # pragma: no cover from asyncio import iscoroutinefunction def noop_wrap(func): @wraps(func) def wrapper(*args, **kwargs): return func(*args, **kwargs) return wrapper def noop_wrap_async(func): if inspect.isgeneratorfunction(func): @wraps(func) async def gen_wrapper(*args, **kwargs):Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 11.2K bytes - Viewed (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(
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Dec 26 20:40:26 UTC 2025 - 11.1K bytes - Viewed (0) -
build-logic/binary-compatibility/src/test/groovy/gradlebuild/binarycompatibility/PublicAPIRulesTest.groovy
BinaryCompatibilityRepository repository def jApiClassifier = Stub(JApiClass) // represents interfaces, enums and annotations def jApiMethod = Stub(JApiMethod) def jApiField = Stub(JApiField) // represents fields and enum literals def jApiConstructor = Stub(JApiConstructor) def incubatingAnnotation = Stub(JApiAnnotation) def deprecatedAnnotation = Stub(JApiAnnotation) def overrideAnnotation = Stub(JApiAnnotation)Registered: Wed Dec 31 11:36:14 UTC 2025 - Last Modified: Fri Jun 06 17:52:09 UTC 2025 - 16K bytes - Viewed (0) -
tests/test_request_params/test_query/test_list.py
# Without aliases @app.get("/required-list-str") async def read_required_list_str(p: Annotated[list[str], Query()]): return {"p": p} class QueryModelRequiredListStr(BaseModel): p: list[str] @app.get("/model-required-list-str") def read_model_required_list_str(p: Annotated[QueryModelRequiredListStr, Query()]): return {"p": p.p}
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:31:34 UTC 2025 - 10.9K bytes - Viewed (0) -
fastapi/_compat/v2.py
return sa or None @property def required(self) -> bool: return self.field_info.is_required() @property def default(self) -> Any: return self.get_default() @property def type_(self) -> Any: return self.field_info.annotation def __post_init__(self) -> None: with warnings.catch_warnings():Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 12:54:56 UTC 2025 - 19.1K bytes - Viewed (0) -
tests/test_tutorial/test_body/test_tutorial001.py
params=[ "tutorial001_py39", pytest.param("tutorial001_py310", marks=needs_py310), ], ) def get_client(request: pytest.FixtureRequest): mod = importlib.import_module(f"docs_src.body.{request.param}") client = TestClient(mod.app) return client def test_body_float(client: TestClient): response = client.post("/items/", json={"name": "Foo", "price": 50.5})Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 10.6K bytes - Viewed (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[Optional[list[str]], Form()] = None, ): return {"p": p} class FormModelOptionalListStr(BaseModel): p: Optional[list[str]] = None @app.post("/model-optional-list-str", operation_id="model_optional_list_str") async def read_model_optional_list_str(p: Annotated[FormModelOptionalListStr, Form()]):
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 9.9K bytes - Viewed (0) -
build-logic/cleanup/src/test/groovy/gradlebuild/cleanup/services/LeakingProcessKillPatternTest.groovy
def projectDir = 'C:\\some\\agent\\workspace' expect: (line =~ KillLeakingJavaProcesses.generateLeakingProcessKillPattern(projectDir)).find() } def "matches daemon process started by performance test on Windows"() {Registered: Wed Dec 31 11:36:14 UTC 2025 - Last Modified: Fri Jul 12 03:42:46 UTC 2024 - 14.8K bytes - Viewed (0) -
build-logic/documentation/src/test/groovy/gradlebuild/docs/dsl/docbook/JavadocConverterTest.groovy
final JavadocConverter parser = new JavadocConverter(document, linkConverter) def respectsLineIndentation() { _ * classMetaData.rawCommentText >> ''' * x * indented ''' when: def result = parser.parse(classMetaData, listener) then: format(result.docbook).contains('x\n indented') } def removesLeadingAsterixFromEachLine() {
Registered: Wed Dec 31 11:36:14 UTC 2025 - Last Modified: Wed Dec 09 08:14:05 UTC 2020 - 14.2K bytes - Viewed (0) -
tests/test_dependency_overrides.py
router = APIRouter() async def common_parameters(q: str, skip: int = 0, limit: int = 100): return {"q": q, "skip": skip, "limit": limit} @app.get("/main-depends/") async def main_depends(commons: dict = Depends(common_parameters)): return {"in": "main-depends", "params": commons} @app.get("/decorator-depends/", dependencies=[Depends(common_parameters)]) async def decorator_depends():
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 11.2K bytes - Viewed (0)