Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for UnionType (0.16 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. fastapi/_compat.py

        origin = get_origin(annotation)
        if origin is Union or origin is UnionType:
            for arg in get_args(annotation):
                if lenient_issubclass(arg, UploadFile):
                    return True
        return False
    
    
    def is_bytes_sequence_annotation(annotation: Any) -> bool:
        origin = get_origin(annotation)
        if origin is Union or origin is UnionType:
            at_least_one = False
            for arg in get_args(annotation):
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 22.6K bytes
    - Viewed (0)
Back to top