Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for TypeVar (0.31 sec)

  1. fastapi/types.py

    import types
    from enum import Enum
    from typing import Any, Callable, Dict, Set, Type, TypeVar, Union
    
    from pydantic import BaseModel
    
    DecoratedCallable = TypeVar("DecoratedCallable", bound=Callable[..., Any])
    UnionType = getattr(types, "UnionType", Union)
    ModelNameMap = Dict[Union[Type[BaseModel], Type[Enum]], str]
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Dec 12 00:29:03 GMT 2023
    - 383 bytes
    - Viewed (0)
  2. tests/test_generic_parameterless_depends.py

    from typing import TypeVar
    
    from fastapi import Depends, FastAPI
    from fastapi.testclient import TestClient
    from typing_extensions import Annotated
    
    app = FastAPI()
    
    T = TypeVar("T")
    
    Dep = Annotated[T, Depends()]
    
    
    class A:
        pass
    
    
    class B:
        pass
    
    
    @app.get("/a")
    async def a(dep: Dep[A]):
        return {"cls": dep.__class__.__name__}
    
    
    @app.get("/b")
    async def b(dep: Dep[B]):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 1.8K bytes
    - Viewed (0)
  3. fastapi/datastructures.py

    from typing import (
        Any,
        BinaryIO,
        Callable,
        Dict,
        Iterable,
        Optional,
        Type,
        TypeVar,
        cast,
    )
    
    from fastapi._compat import (
        PYDANTIC_V2,
        CoreSchema,
        GetJsonSchemaHandler,
        JsonSchemaValue,
        with_info_plain_validator_function,
    )
    from starlette.datastructures import URL as URL  # noqa: F401
    from starlette.datastructures import Address as Address  # noqa: F401
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  4. fastapi/concurrency.py

    from typing import AsyncGenerator, ContextManager, TypeVar
    
    import anyio
    from anyio import CapacityLimiter
    from starlette.concurrency import iterate_in_threadpool as iterate_in_threadpool  # noqa
    from starlette.concurrency import run_in_threadpool as run_in_threadpool  # noqa
    from starlette.concurrency import (  # noqa
        run_until_first_complete as run_until_first_complete,
    )
    
    _T = TypeVar("_T")
    
    
    @asynccontextmanager
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Mon Dec 25 17:57:35 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  5. guava-testlib/src/com/google/common/testing/NullPointerTester.java

          }
    
          boolean isNullableTypeVariable(Type type) {
            if (!(type instanceof TypeVariable)) {
              return false;
            }
            TypeVariable<?> typeVar = (TypeVariable<?>) type;
            for (AnnotatedType bound : typeVar.getAnnotatedBounds()) {
              // Until Java 15, the isNullableTypeVariable case here won't help:
              // https://bugs.openjdk.java.net/browse/JDK-8202469
    Java
    - Registered: Fri Apr 19 12:43:09 GMT 2024
    - Last Modified: Thu Nov 16 15:12:31 GMT 2023
    - 23.3K bytes
    - Viewed (0)
  6. fastapi/applications.py

    from enum import Enum
    from typing import (
        Any,
        Awaitable,
        Callable,
        Coroutine,
        Dict,
        List,
        Optional,
        Sequence,
        Type,
        TypeVar,
        Union,
    )
    
    from fastapi import routing
    from fastapi.datastructures import Default, DefaultPlaceholder
    from fastapi.exception_handlers import (
        http_exception_handler,
        request_validation_exception_handler,
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
Back to top