Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 1 of 1 for test_pep695_type_dependencies (2.44 seconds)

  1. tests/test_dependency_pep695.py

    
    async def some_value() -> int:
        return 123
    
    
    DependedValue = TypeAliasType(
        "DependedValue", Annotated[int, Depends(some_value)], type_params=()
    )
    
    
    def test_pep695_type_dependencies():
        app = FastAPI()
    
        @app.get("/")
        async def get_with_dep(value: DependedValue) -> str:  # noqa
            return f"value: {value}"
    
        client = TestClient(app)
        response = client.get("/")
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Feb 05 18:34:34 GMT 2026
    - 628 bytes
    - Click Count (0)
Back to Top