pydoc > deb822

Help on module deb822:

NAME
    deb822 - Deprecated interface to `debian.deb822`

DATA
    Any = typing.Any
        Special type indicating an unconstrained type.

        - Any is compatible with every type.
        - Any assumed to have all methods.
        - All values assumed to be instances of Any.

        Note that all the above statements are true from the point of view of
        static type checkers. At runtime, Any should not be used with instance
        or class checks.

    Callable = typing.Callable
        Callable type; Callable[[int], str] is a function of (int) -> str.

        The subscription syntax must always be used with exactly two
        values: the argument list and the return type.  The argument list
        must be a list of types or ellipsis; the return type must be a single type.

        There is no syntax to indicate optional or keyword arguments,
        such function types are rarely used as callback types.

    Deb822Mapping = typing.Mapping[str, typing.Any]
    Deb822MutableMapping = typing.MutableMapping[str, typing.Any]
    Deb822ValueType = typing.Any
        Special type indicating an unconstrained type.

        - Any is compatible with every type.
        - Any assumed to have all methods.
        - All values assumed to be instances of Any.

        Note that all the above statements are true from the point of view of
        static type checkers. At runtime, Any should not be used with instance
        or class checks.

    Dict = typing.Dict
        A generic version of dict.

    FrozenSet = typing.FrozenSet
        A generic version of frozenset.

    GPGV_DEFAULT_KEYRINGS = frozenset({'/usr/share/keyrings/debian-keyring...
    GPGV_EXECUTABLE = '/usr/bin/gpgv'
    Generator = typing.Generator
        A generic version of collections.abc.Generator.

    InputDataType = typing.Union[bytes, str, typing.IO[str], typing....s],...
    Iterable = typing.Iterable
        A generic version of collections.abc.Iterable.

    IterableInputDataType = typing.Union[typing.IO[str], typing.IO[bytes],...
    Iterator = typing.Iterator
        A generic version of collections.abc.Iterator.

    List = typing.List
        A generic version of list.

    Literal = typing.Literal
        Special typing form to define literal types (a.k.a. value types).

        This form can be used to indicate to type checkers that the corresponding
        variable or function parameter has a value equivalent to the provided
        literal (or one of several literals):

          def validate_simple(data: Any) -> Literal[True]:  # always returns True
              ...

          MODE = Literal['r', 'rb', 'w', 'wb']
          def open_helper(file: str, mode: MODE) -> str:
              ...

          open_helper('/some/path', 'r')  # Passes type check
          open_helper('/other/path', 'typo')  # Error in type checker

        Literal[...] cannot be subclassed. At runtime, an arbitrary value
        is allowed as type argument to Literal[...], but type checkers may
        impose restrictions.

    Mapping = typing.Mapping
        A generic version of collections.abc.Mapping.

    MutableMapping = typing.MutableMapping
        A generic version of collections.abc.MutableMapping.

    Optional = typing.Optional
        Optional type.

        Optional[X] is equivalent to Union[X, None].

    Set = typing.Set
        A generic version of set.

    TYPE_CHECKING = False
    T_Deb822Dict = ~T_Deb822Dict
    Tuple = typing.Tuple
        Tuple type; Tuple[X, Y] is the cross-product type of X and Y.

        Example: Tuple[T1, T2] is a tuple of two elements corresponding
        to type variables T1 and T2.  Tuple[int, float, str] is a tuple
        of an int, a float and a string.

        To specify a variable-length tuple of homogeneous type, use Tuple[T, ...].

    Type = typing.Type
        A special construct usable to annotate class objects.

        For example, suppose we have the following classes::

          class User: ...  # Abstract base for User classes
          class BasicUser(User): ...
          class ProUser(User): ...
          class TeamUser(User): ...

        And a function that takes a class argument that's a subclass of
        User and returns an instance of the corresponding class::

          U = TypeVar('U', bound=User)
          def new_user(user_class: Type[U]) -> U:
              user = user_class()
              # (Here we could write the user object to a database)
              return user

          joe = new_user(BasicUser)

        At this point the type checker knows that joe has type BasicUser.

    TypedDict = typing_extensions.TypedDict
        A simple typed namespace. At runtime it is equivalent to a plain dict.

        TypedDict creates a dictionary type such that a type checker will expect all
        instances to have a certain set of keys, where each key is
        associated with a value of a consistent type. This expectation
        is not checked at runtime.

        Usage::

            class Point2D(TypedDict):
                x: int
                y: int
                label: str

            a: Point2D = {'x': 1, 'y': 2, 'label': 'good'}  # OK
            b: Point2D = {'z': 3, 'label': 'bad'}           # Fails type check

            assert Point2D(x=1, y=2, label='first') == dict(x=1, y=2, label='first')

        The type info can be accessed via the Point2D.__annotations__ dict, and
        the Point2D.__required_keys__ and Point2D.__optional_keys__ frozensets.
        TypedDict supports an additional equivalent form::

            Point2D = TypedDict('Point2D', {'x': int, 'y': int, 'label': str})

        By default, all keys must be present in a TypedDict. It is possible
        to override this by specifying totality::

            class Point2D(TypedDict, total=False):
                x: int
                y: int

        This means that a Point2D TypedDict can have any of the keys omitted. A type
        checker is only expected to support a literal False or True as the value of
        the total argument. True is the default, and makes all items defined in the
        class body be required.

        The Required and NotRequired special forms can also be used to mark
        individual keys as being required or not required::

            class Point2D(TypedDict):
                x: int  # the "x" key must always be present (Required is the default)
                y: NotRequired[int]  # the "y" key can be omitted

        See PEP 655 for more details on Required and NotRequired.

    Union = typing.Union
        Union type; Union[X, Y] means either X or Y.

        To define a union, use e.g. Union[int, str].  Details:
        - The arguments must be types and there must be at least one.
        - None as an argument is a special case and is replaced by
          type(None).
        - Unions of unions are flattened, e.g.::

            Union[Union[int, str], float] == Union[int, str, float]

        - Unions of a single argument vanish, e.g.::

            Union[int] == int  # The constructor actually returns int

        - Redundant arguments are skipped, e.g.::

            Union[int, str, int] == Union[int, str]

        - When comparing unions, the argument order is ignored, e.g.::

            Union[int, str] == Union[str, int]

        - You cannot subclass or instantiate a union.
        - You can use Optional[X] as a shorthand for Union[X, None].

FILE
    /usr/lib/python3/dist-packages/deb822.py


deb822
NAME DATA FILE

Generated by phpman v4.9.27 · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-07-18 13:19 @216.73.216.114
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!

^_top_^