Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for clone (0.12 sec)

  1. fastapi/utils.py

                create_cloned_field(sub_field, cloned_types=cloned_types)
                for sub_field in field.sub_fields  # type: ignore[attr-defined]
            ]
        if field.key_field:  # type: ignore[attr-defined]
            new_field.key_field = create_cloned_field(  # type: ignore[attr-defined]
                field.key_field,  # type: ignore[attr-defined]
                cloned_types=cloned_types,
            )
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 7.8K bytes
    - Viewed (0)
  2. tests/test_filter_pydantic_sub_model_pv2.py

        assert response.json() == {
            "name": "modelA",
            "description": "model-a-desc",
            "foo": {"username": "test-user"},
        }
    
    
    @needs_pydanticv2
    def test_validator_is_cloned(client: TestClient):
        with pytest.raises(ResponseValidationError) as err:
            client.get("/model/modelX")
        assert err.value.errors() == [
            IsDict(
                {
                    "type": "value_error",
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 6.3K bytes
    - Viewed (0)
  3. fastapi/openapi/docs.py

                        });
                    }
                } else {
                    oauth2.callback({auth: oauth2.auth, token: qp, isValid: isValid, redirectUrl: redirectUrl});
                }
                window.close();
            }
    
            if (document.readyState !== 'loading') {
                run();
            } else {
                document.addEventListener('DOMContentLoaded', function () {
                    run();
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 10.1K bytes
    - Viewed (0)
  4. fastapi/routing.py

                # will always be created.
                # TODO: remove when deprecating Pydantic v1
                self.secure_cloned_response_field: Optional[
                    ModelField
                ] = create_cloned_field(self.response_field)
            else:
                self.response_field = None  # type: ignore
                self.secure_cloned_response_field = None
            self.dependencies = list(dependencies or [])
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 170.1K bytes
    - Viewed (0)
  5. fastapi/applications.py

            app = FastAPI()
    
            @app.head("/items/", status_code=204)
            def get_items_headers(response: Response):
                response.headers["X-Cat-Dog"] = "Alone in the world"
            ```
            """
            return self.router.head(
                path,
                response_model=response_model,
                status_code=status_code,
                tags=tags,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 172.2K bytes
    - Viewed (0)
  6. fastapi/datastructures.py

            """
            return await super().seek(offset)
    
        async def close(self) -> None:
            """
            Close the file.
    
            To be awaitable, compatible with async, this is run in threadpool.
            """
            return await super().close()
    
        @classmethod
        def __get_validators__(cls: Type["UploadFile"]) -> Iterable[Callable[..., Any]]:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 5.6K bytes
    - Viewed (0)
  7. fastapi/exceptions.py

                    """
                ),
            ],
            reason: Annotated[
                Union[str, None],
                Doc(
                    """
                    The reason to close the WebSocket connection.
    
                    It is UTF-8-encoded data. The interpretation of the reason is up to the
                    application, it is not specified by the WebSocket specification.
    
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:48:51 GMT 2024
    - 4.9K bytes
    - Viewed (0)
  8. configure.py

          'w') as f:
        f.write('export PYTHON_BIN_PATH="{}"'.format(python_bin_path))
    
    
    def reset_tf_configure_bazelrc():
      """Reset file that contains customized config settings."""
      open(_TF_BAZELRC, 'w').close()
    
    
    def cleanup_makefile():
      """Delete any leftover BUILD files from the Makefile build.
    
      These files could interfere with Bazel parsing.
      """
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Mon Apr 15 18:25:36 GMT 2024
    - 53.8K bytes
    - Viewed (1)
Back to top