Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 59 for shouldn (0.18 sec)

  1. fastapi/datastructures.py

            cls, source: Type[Any], handler: Callable[[Any], CoreSchema]
        ) -> CoreSchema:
            return with_info_plain_validator_function(cls._validate)
    
    
    class DefaultPlaceholder:
        """
        You shouldn't use this class directly.
    
        It's used internally to recognize when a default value has been overwritten, even
        if the overridden default value was truthy.
        """
    
        def __init__(self, value: Any):
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  2. fastapi/encoders.py

                if it should exclude from the output the fields that had the same default
                value, even when they were explicitly set.
                """
            ),
        ] = False,
        exclude_none: Annotated[
            bool,
            Doc(
                """
                Pydantic's `exclude_none` parameter, passed to Pydantic models to define
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 21:56:59 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_configure_swagger_ui/test_tutorial001.py

        ), "syntaxHighlight should be included and converted to JSON"
        assert (
            '"dom_id": "#swagger-ui"' in response.text
        ), "default configs should be preserved"
        assert "presets: [" in response.text, "default configs should be preserved"
        assert (
            "SwaggerUIBundle.presets.apis," in response.text
        ), "default configs should be preserved"
        assert (
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Sat Aug 19 19:54:04 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  4. tests/test_dependency_contextvars.py

    client = TestClient(app)
    
    
    def test_dependency_contextvars():
        """
        Check that custom middlewares don't affect the contextvar context for dependencies.
    
        The code before yield and the code after yield should be run in the same contextvar
        context, so that request_state_context_var.reset(contextvar_token).
    
        If they are run in a different context, that raises an error.
        """
        response = client.get("/user")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Feb 17 12:40:12 GMT 2022
    - 1.5K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_path_params/test_tutorial005.py

        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "enum",
                        "loc": ["path", "model_name"],
                        "msg": "Input should be 'alexnet', 'resnet' or 'lenet'",
                        "input": "foo",
                        "ctx": {"expected": "'alexnet', 'resnet' or 'lenet'"},
                    }
                ]
            }
        ) | IsDict(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Sep 28 04:14:40 GMT 2023
    - 5K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_body_multiple_params/test_tutorial001_an.py

        assert response.json() == IsDict(
            {
                "detail": [
                    {
                        "type": "int_parsing",
                        "loc": ["path", "item_id"],
                        "msg": "Input should be a valid integer, unable to parse string as an integer",
                        "input": "foo",
                    }
                ]
            }
        ) | IsDict(
            # TODO: remove when deprecating Pydantic v1
            {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.5K bytes
    - Viewed (0)
  7. tests/test_starlette_exception.py

        raise HTTPException(status_code=204)
    
    
    @app.get("/http-no-body-statuscode-with-detail-exception")
    async def no_body_status_code_with_detail_exception():
        raise HTTPException(status_code=204, detail="I should just disappear!")
    
    
    @app.get("/starlette-items/{item_id}")
    async def read_starlette_item(item_id: str):
        if item_id not in items:
            raise StarletteHTTPException(status_code=404, detail="Item not found")
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 7.4K bytes
    - Viewed (0)
  8. tests/test_security_oauth2_optional.py

            {
                "detail": [
                    {
                        "type": "string_pattern_mismatch",
                        "loc": ["body", "grant_type"],
                        "msg": "String should match pattern 'password'",
                        "input": "incorrect",
                        "ctx": {"pattern": "password"},
                    }
                ]
            }
        ) | IsDict(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  9. tensorflow/api_template.__init__.py

        importlib.import_module("tf_keras.src.optimizers")
      else:
        importlib.import_module("keras.src.optimizers")
    except (ImportError, AttributeError):
      pass
    
    del importlib
    
    # Delete modules that should be hidden from dir().
    # Don't fail if these modules are not available.
    # For e.g. this file will be originally placed under tensorflow/_api/v1 which
    # does not have "python", "core" directories. Then, it will be copied
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Tue Mar 05 06:27:59 GMT 2024
    - 6.7K bytes
    - Viewed (3)
  10. tests/test_schema_extra_examples.py

                    ],
                ),
            ):
                return item
    
        # TODO: enable these tests once/if Form(embed=False) is supported
        # TODO: In that case, define if File() should support example/examples too
        # @app.post("/form_example")
        # def form_example(firstname: str = Form(example="John")):
        #     return firstname
    
        # @app.post("/form_examples")
        # def form_examples(
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 37.7K bytes
    - Viewed (0)
Back to top