Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 26 for getAttrs (0.06 sec)

  1. tests/test_custom_route_class.py

    def test_route_classes():
        routes = {}
        for r in app.router.routes:
            assert isinstance(r, Route)
            routes[r.path] = r
        assert getattr(routes["/a/"], "x_type") == "A"  # noqa: B009
        assert getattr(routes["/a/b/"], "x_type") == "B"  # noqa: B009
        assert getattr(routes["/a/b/c/"], "x_type") == "C"  # noqa: B009
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  2. fastapi/dependencies/utils.py

                        # For Pydantic v1
                        and getattr(field, "shape", 1) == 1
                    )
                )
    
        return ParamDetails(type_annotation=type_annotation, depends=depends, field=field)
    
    
    def add_param_to_fields(*, field: ModelField, dependant: Dependant) -> None:
        field_info = field.field_info
        field_info_in = getattr(field_info, "in_", None)
        if field_info_in == params.ParamTypes.path:
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 27 21:46:26 UTC 2024
    - 34.7K bytes
    - Viewed (0)
  3. 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]
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Dec 12 00:29:03 UTC 2023
    - 383 bytes
    - Viewed (0)
  4. fastapi/openapi/utils.py

                openapi_examples = getattr(field_info, "openapi_examples", None)
                example = getattr(field_info, "example", None)
                if openapi_examples:
                    parameter["examples"] = jsonable_encoder(openapi_examples)
                elif example != Undefined:
                    parameter["example"] = jsonable_encoder(example)
                if getattr(field_info, "deprecated", None):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 22.6K bytes
    - Viewed (0)
  5. docs_src/sql_databases_peewee/sql_app/schemas.py

    from typing import Any, List, Union
    
    import peewee
    from pydantic import BaseModel
    from pydantic.utils import GetterDict
    
    
    class PeeweeGetterDict(GetterDict):
        def get(self, key: Any, default: Any = None):
            res = getattr(self._obj, key, default)
            if isinstance(res, peewee.ModelSelect):
                return list(res)
            return res
    
    
    class ItemBase(BaseModel):
        title: str
        description: Union[str, None] = None
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat May 14 11:59:59 UTC 2022
    - 868 bytes
    - Viewed (0)
  6. fastapi/exception_handlers.py

    from starlette.status import HTTP_422_UNPROCESSABLE_ENTITY, WS_1008_POLICY_VIOLATION
    
    
    async def http_exception_handler(request: Request, exc: HTTPException) -> Response:
        headers = getattr(exc, "headers", None)
        if not is_body_allowed_for_status_code(exc.status_code):
            return Response(status_code=exc.status_code, headers=headers)
        return JSONResponse(
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Jun 11 19:08:14 UTC 2023
    - 1.3K bytes
    - Viewed (0)
  7. android/guava/src/com/google/common/collect/EnumBiMap.java

       * probably work around it by changing how we annotate the J2CL EnumMap, but that's probably more
       * trouble than just using Object.class.)
       *
       * Then we declare the getters for these fields as @GwtIncompatible so that no one can try to use
       * them under J2CL—or, as an unfortunate side effect, under GWT. We do still give the fields
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Aug 24 01:40:03 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  8. guava/src/com/google/common/collect/EnumBiMap.java

       * probably work around it by changing how we annotate the J2CL EnumMap, but that's probably more
       * trouble than just using Object.class.)
       *
       * Then we declare the getters for these fields as @GwtIncompatible so that no one can try to use
       * them under J2CL—or, as an unfortunate side effect, under GWT. We do still give the fields
    Registered: Fri Nov 01 12:43:10 UTC 2024
    - Last Modified: Thu Aug 24 01:40:03 UTC 2023
    - 6.3K bytes
    - Viewed (0)
  9. docs/changelogs/upgrading_to_okhttp_4.md

    in a future release! If you’re skipping releases, it’ll be much easier if you upgrade to OkHttp 4.0
    as an intermediate step.
    
    #### Vars and Vals
    
    Java doesn’t have language support for properties so developers make do with getters and setters.
    Kotlin does have properties and we take advantage of them in OkHttp.
    
     * **Address**: certificatePinner, connectionSpecs, dns, hostnameVerifier, protocols, proxy,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Sun Feb 06 16:58:16 UTC 2022
    - 10.9K bytes
    - Viewed (0)
  10. compat/maven-model-builder/src/main/java/org/apache/maven/model/interpolation/reflection/ReflectionValueExtractor.java

    /**
     * Using simple dotted expressions to extract the values from an Object instance using JSP-like expressions
     * such as {@code project.build.sourceDirectory}.
     * <p>
     * In addition to usual getters using {@code getXxx} or {@code isXxx} suffixes, accessors
     * using {@code asXxx} or {@code toXxx} prefixes are also supported.
     *
     * @deprecated use {@link org.apache.maven.api.services.ModelBuilder} instead
     */
    Registered: Sun Nov 03 03:35:11 UTC 2024
    - Last Modified: Fri Oct 25 12:31:46 UTC 2024
    - 10.8K bytes
    - Viewed (0)
Back to top