- Sort Score
- Result 10 results
- Languages All
Results 641 - 650 of 4,518 for None (1.12 sec)
-
tests/test_reponse_set_reponse_code_empty.py
from typing import Any from fastapi import FastAPI, Response from fastapi.testclient import TestClient app = FastAPI() @app.delete( "/{id}", status_code=204, response_model=None, ) async def delete_deployment( id: int, response: Response, ) -> Any: response.status_code = 400 return {"msg": "Status overwritten", "id": id} client = TestClient(app)
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 3.1K bytes - Viewed (0) -
tests/test_security_oauth2_password_bearer_optional_description.py
tokenUrl="/token", description="OAuth2PasswordBearer security scheme", auto_error=False, ) @app.get("/items/") async def read_items(token: Optional[str] = Security(oauth2_scheme)): if token is None: return {"msg": "Create an account first"} return {"token": token} client = TestClient(app) def test_no_token(): response = client.get("/items")Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Jun 30 18:25:16 UTC 2023 - 2.2K bytes - Viewed (0) -
tests/test_tutorial/test_dataclasses/test_tutorial002.py
assert response.json() == { "name": "Island In The Moon", "price": 12.99, "description": "A place to be playin' and havin' fun", "tags": ["breater"], "tax": None, } def test_openapi_schema(client: TestClient): response = client.get("/openapi.json") assert response.status_code == 200 assert response.json() == snapshot( {
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sat Dec 27 18:19:10 UTC 2025 - 2.9K bytes - Viewed (0) -
tests/test_dependency_contextvars.py
from fastapi import Depends, FastAPI, Request, Response from fastapi.testclient import TestClient legacy_request_state_context_var: ContextVar[Optional[dict[str, Any]]] = ContextVar( "legacy_request_state_context_var", default=None ) app = FastAPI() async def set_up_request_state_dependency(): request_state = {"user": "deadpond"} contextvar_token = legacy_request_state_context_var.set(request_state) yield request_state
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Wed Dec 17 21:25:59 UTC 2025 - 1.5K bytes - Viewed (0) -
impl/maven-core/src/main/java/org/apache/maven/configuration/BeanConfigurationValuePreprocessor.java
* * @param value The configuration value to preprocess, must not be {@code null}. * @param type The target type of the value, may be {@code null}. * @return The processed configuration value or {@code null} if none. * @throws BeanConfigurationException If an error occurred while preprocessing the value. */ Object preprocessValue(String value, Class<?> type) throws BeanConfigurationException;Registered: Sun Dec 28 03:35:09 UTC 2025 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 1.9K bytes - Viewed (0) -
impl/maven-core/src/main/java/org/apache/maven/configuration/BeanConfigurationPathTranslator.java
public interface BeanConfigurationPathTranslator { /** * Translates the specified path. * * @param path The path to translate, may be {@code null}. * @return The translated path or {@code null} if none. */ File translatePath(File path);Registered: Sun Dec 28 03:35:09 UTC 2025 - Last Modified: Fri Oct 25 12:31:46 UTC 2024 - 1.3K bytes - Viewed (0) -
docs/zh/docs/tutorial/sql-databases.md
终于,我们英雄(hero)的身份得到了保护! 🥷 它还重新声明了 `id: int` 。这样我们便与 API 客户端建立了一种**约定**,使他们始终可以期待 `id` 存在并且是一个整数 `int`(永远不会是 `None` )。 /// tip 确保返回模型始终提供一个值并且始终是 `int` (而不是 `None` )对 API 客户端非常有用,他们可以在这种确定性下编写更简单的代码。 此外,**自动生成的客户端**将拥有更简洁的接口,这样与您的 API 交互的开发者就能更轻松地使用您的 API。😎 /// `HeroPublic` 中的所有字段都与 `HeroBase` 中的相同,其中 `id` 声明为 `int` (不是 `None` ): * `id` * `name` * `age` * `secret_name`
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Sun Dec 15 17:11:14 UTC 2024 - 14.9K bytes - Viewed (0) -
impl/maven-cli/src/test/java/org/apache/maven/cling/invoker/cisupport/CIDetectorHelperRunner.java
Registered: Sun Dec 28 03:35:09 UTC 2025 - Last Modified: Sun Apr 13 18:50:07 UTC 2025 - 1.3K bytes - Viewed (0) -
scripts/playwright/separate_openapi_schemas/image05.py
import subprocess from playwright.sync_api import Playwright, sync_playwright # Run playwright codegen to generate the code below, copy paste the sections in run() def run(playwright: Playwright) -> None: browser = playwright.chromium.launch(headless=False) # Update the viewport manually context = browser.new_context(viewport={"width": 960, "height": 1080}) page = context.new_page() page.goto("http://localhost:8000/docs")
Registered: Sun Dec 28 07:19:09 UTC 2025 - Last Modified: Fri Sep 13 09:14:46 UTC 2024 - 984 bytes - Viewed (0) -
.golangci.yml
version: "2" linters: default: none enable: - durationcheck - forcetypeassert - gocritic - gomodguard - govet - ineffassign - misspell - revive - staticcheck - unconvert - unused - usetesting - whitespace settings: misspell: locale: US staticcheck: checks: - all - -SA1008 - -SA1019 - -SA4000Registered: Sun Dec 28 19:28:13 UTC 2025 - Last Modified: Sun Mar 30 00:56:02 UTC 2025 - 1.2K bytes - Viewed (0)