Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 6 of 6 for cannot (0.14 sec)

  1. fastapi/params.py

            include_in_schema: bool = True,
            json_schema_extra: Union[Dict[str, Any], None] = None,
            **extra: Any,
        ):
            assert default is ..., "Path parameters cannot have a default value"
            self.in_ = self.in_
            super().__init__(
                default=default,
                default_factory=default_factory,
                annotation=annotation,
                alias=alias,
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
  2. tests/test_ambiguous_params.py

        with pytest.raises(
            AssertionError, match="Path parameters cannot have a default value"
        ):
    
            @app.get("/items/{item_id}/")
            async def get_item(item_id: Annotated[int, Path(default=1)]):
                pass  # pragma: nocover
    
        with pytest.raises(
            AssertionError,
            match=(
                "`Query` default value cannot be set in `Annotated` for 'item_id'. Set the"
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Dec 12 00:22:47 GMT 2023
    - 2.1K bytes
    - Viewed (0)
  3. fastapi/dependencies/utils.py

                    f"`{field_info.__class__.__name__}` default value cannot be set in"
                    f" `Annotated` for {param_name!r}. Set the default value with `=` instead."
                )
                if value is not inspect.Signature.empty:
                    assert not is_path_param, "Path parameters cannot have default values"
                    field_info.default = value
                else:
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Tue Apr 02 02:52:56 GMT 2024
    - 29.5K bytes
    - Viewed (0)
  4. ci/official/wheel_test/test_import_api_packages.py

          with open(api_packages_path) as file:
            return set(file.read().splitlines())
    
        super().setUp()
        self.api_packages_v2 = _get_api_packages_v2()
        # Some paths in the api_packages_path file cannot be directly imported.
        # These paths may point to attributes or sub-modules within a module's
        # namespace, but they don't correspond to an actual file
        # or directory on the filesystem.
        self.packages_for_skip = [
    Python
    - Registered: Tue Apr 30 12:39:09 GMT 2024
    - Last Modified: Wed Sep 13 15:52:07 GMT 2023
    - 3.3K bytes
    - Viewed (0)
  5. configure.py

        # Check if the path is valid
        if os.path.isfile(python_bin_path) and os.access(python_bin_path, os.X_OK):
          break
        elif not os.path.exists(python_bin_path):
          print('Invalid python path: {} cannot be found.'.format(python_bin_path))
        else:
          print('{} is not executable.  Is it the python binary?'.format(
              python_bin_path))
        environ_cp['PYTHON_BIN_PATH'] = ''
    
    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)
  6. fastapi/routing.py

                    """
                ),
            ] = None,
            # the generic to Lifespan[AppType] is the type of the top level application
            # which the router cannot know statically, so we use typing.Any
            lifespan: Annotated[
                Optional[Lifespan[Any]],
                Doc(
                    """
    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)
Back to top