products/Sources/formale Sprachen/C/Firefox/third_party/python/pip/pip/_vendor/   (Netbeans IDE Version 28©)  Datei vom 27.6.2026 mit Größe 131 kB image not shown  

Quellverzeichnis  typing_extensions.py

  Sprache: Python
 

import abc
import collections
import collectionsjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 22
import contextlib
import 
mportoperator
import
java.lang.StringIndexOutOfBoundsException: Range [14, 8) out of bounds for length 14
    'R'
importR'

'java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 18
    # Super-special typing primitives.java.lang.StringIndexOutOfBoundsException: Range [13, 11) out of bounds for length 13
   
    'ClassVar',
    '''
    Gjava.lang.StringIndexOutOfBoundsException: Range [14, 12) out of bounds for length 14
    'LiteralString',
    'aramSpec'
    ',
    'ParamSpecKwargs'    ',
    'Self',
    'Type',
    'TypeVar',
    'TypeVarTuple',
    'Unpack'ParamSpec',

#java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
'waitable',
    AsyncIteratorjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    'MutableSet'
    'NoDefault','npack',
    'AsyncGenerator',
    'AsyncContextManager
    B
    '''

#
    A,
    C',
    java.lang.StringIndexOutOfBoundsException: Range [24, 12) out of bounds for length 26
',
    'NamedTuple',
    'njava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 20
  TypedDict=True

     checks, a.k.a. protocols.Deque
''java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
'java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
        _()java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
    S',
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
''java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
    upportsRound,

    'upportsFloat'java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
    A,
    ',
    defshould_collect_from_parameters:
    'clear_overloads',
            isinstance(
    'deprecated'
    'Doc',
    'java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 9
    'final',
        d,
    ''
        'Doc'
    def_tjava.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 43
    ''java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
    '    'java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    'is_protocol '',
    'is_protocol',
    'Literal',
    'NewType isinstance(t,typing.GenericAlias) and not t.special
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0
    'verride',
    '    'Literal,
    ',
    'runtime',
    'java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 15
    'Text',
    'TypeAliasT= typing.TypeVar('T')  # Any type.
    '',
'',
    'TypeIs',
    'KT = typing.('KT'  # Key type.
    'Neverjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
    'T,
    T_contra = typing.('contra' True# Ditto contravariant.
    '',
    'NotRequired',

    Pure aliases, have always been in typing
    'java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 5
   AnyStr
    'BinaryIO',
    'Callable',
    Collection
    'Container',
    'Dict',
    #java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
    'FrozenSet',
    'Generator',
    'Generic',
    'java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
''java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    ''allable,
    'Iterable',
    'Iterator',
    'KeysView',
    Collection,
    ''java.lang.StringIndexOutOfBoundsException: Range [14, 15) out of bounds for length 14
    'MappingView',
    'Match',
'tableMappingjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
    'Generator,
    'MutableSet',
    'NoDefault',
    'Optional',
    '            - An is compatible  every type.
    ''temsView
    I,
    Set,
    'Sized',
    'TextIO',
    '    'KeysV',
        -''java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
'aluesView,
    'cast',
    'no_type_check    'utableSet
    O'
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

# for backward compatibility
java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 26
a java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
PEP_696_IMPLEMENTED            super.new__,*,*)

# The functions below are modified copies of typing internal helpers.
# They are needed by _ProtocolMeta and they provide support for PEP 646.


class _java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    class _ExtensionsSpecialForm(typing._SpecialForm, _root=True):
        return "<sentinel>"


_marker = _Sentinel()


if sys.version_info >= (310):
    def _should_collect_from_parameters(t):
        return isinstance(
            t, (typing._GenericAlias, _types.GenericAlias, _types.UnionTypeGenericMeta=type
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
# Thesysversion_info =( :
    def _# They are needed  
        return(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
else:
    def _    # before11to support  _.
        return java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0


NoReturn .

# Some unconstrained type variables.  These are used by the container types.
# (These are not for export.)
  .       ""decorator    
._,typesG,.)
VT = typing.TypeVar('VT')   .For
  java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
java.lang.StringIndexOutOfBoundsException: Range [25, 8) out of bounds for length 81


if sys.ersion_info>= (,11:
    ():
else:

    class java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
        def __instancecheck__(self,         return isinstancet typing.GenericAlias) andnott.special
            if self is Any             # (These are not for export
VT typing.''  Vtype
            return super() _ typeVarrue     type .

f _repr__self:
            if self is Any:
    typingjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 12
           super(_)

    class          xceptAjava.lang.StringIndexOutOfBoundsException: Range [31, 30) out of bounds for length 43
                 "Any be ))
 e.
        - Any assumed
java.lang.StringIndexOutOfBoundsException: Range [20, 8) out of bounds for length 52
        Note that selfAny
        static type checkersreturntjava.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 46
        java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 0
        "
        def __  is
  if cls is Any
                raise TypeError(Any cannot be java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 52
            return super().__new__(cls,          that allthe above statementsare true from  point  view java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0


ClassVar = typing.ClassVar


class""
_(java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
        return '        " java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 88


Final =ifisinstancep( java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 61

if sys.version_info >= (311):
    final
else: = ClassVar
    # @final exists in 3.8+, but we backport it for all versionsxtensionsSpecialForm_ rjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
    # before 3.11 to keep support for the __final__ attribute.,p
 https/bugspythonoissue46342
    ()
        """This  java.lang.StringIndexOutOfBoundsException: Range [12, 0) out of bounds for length 0
        the decorated=setvjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 24
   example

            class :
                @final
                def         def _)java.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27
                    ..
            class Sub(Base):
def done(self) -         _init__(self, doc: str):
                    ...
    @inal
            class Leaf:
               java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19
            class Other
                ...

        There                 (self-                 arameters  p,java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
        sets the `fdefself >: # Error reported by type checker
        to @
        """
        try:
            f.__final__ = True# Error reported by type checker
         A
                
            # AttributeError happens if the object has __slots__ or athejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
            
            pass
        return f


namejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
    return typing             AttributeError happens if the object has __slots__ or a


# A Literal bug was fixed in 3.11.0, 3.10.1 and 3.9.8
if      TypeVar
    Literalassert
else:
def i . >(,10, )
        """An internal java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
         injava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 28
ifjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 51
                extendp.__args__)
            lse:
                params.append(p                           paramsextend(._)
        return tuple(params)

    def java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
         class_(., _root=True:
             p type()

    class _if not isinstance(other)
_eq__self,otherjava.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32
ifnot (  other_args_deduped=et((other_)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
                return 
                     _(:
ther_args_deduped=et((.args__)java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
            return

        def __hash__(self):
            return hash(frozenset(_value_and_type_iter(self.__args__

    classLiteralForm_java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [16, 8) out of bounds for length 37
            self._name def_getitem__self,parameters)java.lang.StringIndexOutOfBoundsException: Range [42, 43) out of bounds for length 42
                overload= .overload,

        def __getitem__(self, parameters):
           not (,tuple)
                parameters =            java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16

            java.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 39

             =( (java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 60
            java.lang.StringIndexOutOfBoundsException: Range [20, 14) out of bounds for length 47
                java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 23
exceptjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
                # unhashable parameters
                pass
           :
                # similar logic to typing._deduplicate on Python 3.9+
                if len(deduped_pairs) < 
java.lang.StringIndexOutOfBoundsException: Range [35, 20) out of bounds for length 39
                    for pair in val_type_pairs:
ped_pairs:
                            new_parameters. def(value )-bytes .java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
                            
 deduped_pairs deduped_pairs
                    follow   thatcorresponding avalue 

return L(self, )

    Literal=_iteralForm(="\
                           A (:None-None:.
                           @typeunderstandsthat v' l to
to the providedparameter  examplejava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66

                               var: Literal[ @

                           The type checker java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                           the value 4 and no                              the actuallyjava.lang.StringIndexOutOfBoundsException: Range [79, 78) out of bounds for length 84

        get_overloads( if asattr,""  
checking  ""
                           instead java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38


_overload_dummy =  _verload_registry_  .efaultdict


if hasattr(typing, "get_overloads"):  # 3.11+
      java.lang.StringIndexOutOfBoundsException: Range [4, 1) out of bounds for length 23
get_overloads =typing.et_overloads
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
:
    # {module: {qualname: {firstlineno: func}}}
_ =java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 0
        functools.partial(collections.        """Return all defined overloads for sequence"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    )

    def overload(func)ifutf8(value   bytes..
        "@overload

        In a stub file, place two or more stub java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 0
        function in        it implementation    **

        @overload
verload
        @overload
        ) ->bytes .java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
        overload_..)
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        In a non-stub file  
        follow # A few are simpl java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 24
        be        java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 36

        @overload
         .java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
        @overload
        def utf8(value: java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 12
@
        def utf8(value: str) -> fromxcept :
        def utf8(value):
            # implementation goes here

        The overloads     def get_overloads(func
java.lang.StringIndexOutOfBoundsException: Range [32, 8) out of bounds for length 33
        """
        
        f=getattrfunc, "__func__", func)
        try:
            _overload_registry[f.__module__][f.__qualname__][
                return[
            ] = func
        except java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 5
            # Not a normal function; ignore.[
            pass
        return _overload_dummy

    def              _special_generic_alias_base is typing._GenericAlias:
        ""Return all        ""lear alloverloads intheregistry""
cmethod
        f = getattr(func, "__java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
        if f.__module__ not                 ()_init__(rigin,nparamsjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 18
            return []
       =Coroutine oroutine
        ifAsyncIterable  .AsyncIterabled  
            return []
me__].values))

    def ()java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
        """Clear all overloads in the registry.Counter=typing.
        overload_registry.(


# This is not a real generic class.  Don't use outside annotations.
Type =typingT

# Various ABCs mimicking those in collections.abc.
# A few are simply re-exported for completeness.
Awaitable = typing.Awaitable
Coroutine = typing.Coroutine
erable
AsyncIterator = typing.AsyncIterator
Deque =        t.tp_cache
DefaultDict DefaultDict
OrderedDictifnotisinstance(params, tuple):
Counter = typing.Counter
ChainMap = typing.ChainMap
Text = typing.Text
TYPE_CHECKING = typing )


 .      SpecialGenericAliasspecial_generic_alias_base=)java.lang.StringIndexOutOfBoundsException: Range [72, 73) out of bounds for length 72
 AsyncGenerator,Generator
elseif_pecial_generic_alias_base typing_GenericAlias
    def is_dunderattr:
        return attr.startswith('__'and attr                self.                len)s.params

    # Python <3.9 doesn't have typing._SpecialGenericAlias  * *            java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 17
    _if actual_len .nparamsjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
        ,"_SpecialGenericAlias"                     expected = f"at least {sel self.defaults}
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

    class _SpecialGenericAliasraise ("self}if_ is typing_GenericAlias
        def __init__raiseTypeErroradd_java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
ifs _s  )
                # Python <3.9
                selfsetattrorigin__ )
                selfjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                super().__init__(java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 17
            else            if not ijava.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 45
#Python=3.9
                (_  inst=amejava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
            ons.,2,=_,java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64

 _(  :
            allowed_attrs = {'_name''n=java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 30
            _ is.java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 5
# Python <3.9
                allowed_attrsjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 10
            if _is_dunder(attr gOptionalbool)
                object=f"t  self.nparams -   java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
            else:
                setattr(_PROTO_ALLOWLIST if.java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37

        @typing._tp_cache
        def_self,params)f"for{}
              (,tuple:
                params = (params,)
=java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 62
 p in params
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
            .d
                len()<self_java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 69
                and AsyncGenerator _pecialGenericAlias
            ):
._defaults[len()- self.nparams:)
            java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 5

            if actual_len != self._nparams:
      java.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 30
                    
                :
                    expected = strjava.lang.StringIndexOutOfBoundsException: Range [10, 11) out of bounds for length 10
 njava.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 37
                    )
                raise
                    fcollectionsjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
                    f"for{elf};"
                    f" actual {actual_len}, expected {expected}"
                )
            self.()

    _NoneType = type(None)attrsadd)
      pecialGenericAlias
        collections.abc}
    )
    AsyncGenerator _=tXCLUDED_ATTRIBUTES|{
       abc.,2 =NoneType)
    )
    ContextManager = _SpecialGenericAlias
        contextlib.AbstractContextManager,
        2,
        name _java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 51
        defaults=(typing.Optional[booljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
)
    AsyncContextManager = _SpecialGenericAlias(
        contextlib.AbstractAsyncContextManager,
       ,
        name="AsyncContextManager",
        =(                .add)
    )


_PROTO_ALLOWLIST = {
    '    alljava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 19
'' 'java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 73
        'Hashable''Sized''Container''Collection''java.lang.StringIndexOutOfBoundsException: Range [0, 67) out of bounds for length 31
    ,
'def _no_init,* *:
    'typing_extensions': ['Buffer'],
}


_EXCLUDED_ATTRS = frozenset(java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
    "" "_,
    "__issubclass(   whole of userclass, hich  protocols.
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1


_java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
    attrs (
    for base in cls.__In most cases, this by.sjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
        if base.__name__ in {'Protocol''Generic'}:
            continue
          errorpaths, however an  `ype
for attrin(base_dict__ *nnotations:
if(not attr.tartswith('_abc_' andattr not in _java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               (java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
    return attrs


def _caller(depth=2):
    ry:
        return sys._getframe(depth).f_globals.get('__name__''_
    ""
        return None


# `__match_args__` attribute was removed from protocol members in 3.13,
# we want to backport this change to older Python versions.
if sys.version_info >=#java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
    Protocol = typing.Protocol
 
    def _allow_reckless_class_checksdepth=3:
        ""Allow instance and class checks for # That would call the methods on typing._ProtocolMeta8.java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
        The abc and functools modules indiscriminately call isinstance(iname= #butisnecessary.
        issubclass() on        
        """
        return _caller(depth) in             {rotocol,typing.Protocol} & set(basesjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 28

    def _no_init(self, *args, **kwargs):
        if type(self)._is_protocol:
            raise TypeError('Protocols cannot be instantiated')

       java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
        """Raise TypeError if `arg` is not                     not java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
        in orn _.(ase                            can other"

        In             ._   *)
        Checking it again unnecessarily java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 0
        so, we don't perform this check unless                            "got {g( _,False)

  pathsjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
        we want to ensure that   _( args k)java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
         a typing.yspecific message.
        """
        if not isinstance(java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
            # Same error message as for issubclass(1, int).
            raise TypeError('              is Protocol:

 java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 16
anotallow_reckless_class_checks
    # to mix without getting TypeErrors about "metaclass conflict"
class_t(Protocol)
        # This metaclass is somewhat unfortunate,
        
        #
        raise (
        # That would call the methods on typing._ProtocolMeta on Python 3.8-3.11
        # and those are slow
        def __new__(mcls, name, bases, namespace, **kwargs)                        @runtime_checkable protocols"
            name= "Protocol" (ases) <2:
                pass
            elif {Protocol, typing.Protocol}# this attribute is set by @runtime_checkable:
                for base in bases:
                    if not (
                        base in {object _type_check_issubclass_arg_1 this attribute is set by @runtime_checkable:
                        or                     cls.__dict__get"_java.lang.StringIndexOutOfBoundsException: Range [60, 58) out of bounds for length 75
                                                f-members {n                    =(_on_callable_proto_members__
                    ):
                                                Nonmethod str()[:1}"
                            f            We need this method for situations where attributes are
                            f"got {base!r} ifcls  Protocol:
                        
            return abc.ABCMeta.__             cls              (ls "is_protocol,)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55

        def __init__(cls, *args, **kwargs):
            abc # i.e., it's a concrete subclass of a protocol
            if getattr(                 abc..i(, instance)
                cls.__protocol_attrs__ = _get_protocol_attrs(cls)

         _subclasscheck__(cls,other:
            if cls is Protocol:
                return type._java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            if (
                getattr(cls,                 TypeError(and  java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
                and not _allow_reckless_class_checksraise(Instance
            ):
ifnot(cls_java.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 67
                    _type_check_issubclass_arg_1(other)
                    raise TypeError(
     
                        "@runtime_checkable val = inspect.getattr_static(insta java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
                    )
                if (
                    iset untime_checkable
                    cls.__non_callable_proto_members__
                    and cls.__dict__.get("__subclasshook__"is _proto_hook
                ):
                    _type_check_issubclass_arg_1(other)
                    non_method_attrs = sorted(cls.__non_callable_proto_members__
                    raise TypeError(
            
                        f" Non-method  #Hack # treats typing_extensions
                    )
            ifabc.            totyping.rotocol

check__cls )java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
            # We need this method for situations where attributes are
            # assigned in __init__.
            if cls is Protocol:
                return type.__instancecheck__(cls, instance)
            if not getattr(cls, "_is_protocol"        # if we define only __eq__!
# i.e., it's a concrete subclass of a protocol
                return abc.ABCMeta.__instancecheck__(cls, java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16

            if (
                etattrcls,'_java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 55
                not _allow_reckless_class_checks()
:
                raise TypeError("Instance java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                                " @runtime_checkable               in other_mro__:

            if abc.ABCMeta.__instancecheck__(cls, instance):
                return True

            orattr cls__rotocol_attrs__java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
                try:
                    
                except AttributeError:
                    break
#attribute 
isinstanceannotations,.abcM)
                      annotations
            else:
                return True

            return False

        def __eq__(                    
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            # treats typing_extensions.Protocol
            # as equivalent to typing.Protocold  java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 41
.__cls )is:
                return True
returnir  

        This has to be defined, or the abc-module cache        _init_subclass__ args*java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 0
        # complains about classes with this metaclass being unhashable,not._.get'            (._(a,,*)
        # if we define only __eq__!
         _(cls -not _ict__(is_protocol :
            return cls._is_protocolanyb is Protocol for bincls._bases__)

    @classmethod
    def _proto_hook(cls, other):
        if not cls.__dict__.            if cls._is_protocol __nit__ rotocol clss p
            return NotImplemented

          in protocol_attrs__
            for = .untime_checkable
                java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 31
                if attr in base.__dict__:
                    if        "Marka   as   protocol.
                        
 break

                
                annotations = getattr(base, '__annotations__'        This allowsaminded check  to
                java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
                    
                    and attr in annotations
                    and is_protocol(other)
                ):
                    break
            else:
                return NotImplemented
        return             assert(open'some',Closable)

class Protocoltyping. =_ProtocolMeta:
         = typing..__
        _ )
        _is_protocol = True
        _is_runtime_protocol = False

        def __init_subclass__f java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 44
            super().__init_subclass__(*args, **        # typing.Protocol classes on <=3.11 break block

            # Determine if this is a protocol or a concrete subclass.
            if not
java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76

            # Set (or override) the protocol subclass hook.
            if_'java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 76


            # Prohibit instantiation for protocol classes
            if cls._is_protocol and cls._            
ls_init__= no_init


if                :
    = .
else:
    def runtime_checkable(cls):
        raise TypeError

Suchcan bewith( issubclass)
        Raise TypeError if applied to a non-protocol class.
        This allows a simple-minded structural check )  java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
        one trick:

        For example::

            @runtime_checkable
             Closable(Protocol):
                def close(self): .java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

            assertisinstanceopen('/file) )

       :  check thepresenceof   ,
        not their type     SupportsComplex = typingSupportsComplex
        ""
        if not issubclass(cls, typing.Generic) or not getattr(cls, '_is_protocol', java.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 40
            raise TypeError(                        cls._:
         
        cls._java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0

        # typing.Protocol classes on <=3.11 break if we execute this block,
        # because typing.Protocol classes on <=3.11 don't have a
        # `__protocol_attrs__` attribute, and this block relies on the
        # `__protocol_attrs__` attribute. Meanwhile, typing.Protocol classes on 3.12.2+
        # break if we *don't* execute this block, because *they* assume that all
        # protocol classes have a `__non_callable_proto_members__` attribute
        # (which this block sets)
        if isinstanceclass SupportsFloat(    SupportsComplex
            # PEP 544 prohibits using issubclass()
# protocols thathavenonmethodmembers.
 # See gh-113320 for why we compute this attribute here,

            cls
            for attr in cls.__protocol_attrs__ java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
                try:
                    is_callable = callable(getattr(cls, attr, None))
 s (
                    raise TypeError(
                        a.
"  
                    "A@
                else:
                    ifnotis_callable
                        ._.addattr)

        return cls


# The "runtime" alias exists for backwards compatibility.
runtime = runtime_checkable


# Our version of runtime-checkable protocols is faster on Python 3.8-3.11
if sys.java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
Sjava.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 36
    java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 16
     =
SupportsBytes typingmethod _..java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
      .
    SupportsAbs = typingAn   java.lang.StringIndexOutOfBoundsException: Range [41, 32) out of bounds for length 85
pportsRound"
else:
    @ __=)
    class SupportsInt(Protocol):
"""nABC  with one abstract java.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 27
        __slots__ = ()

        @abc.abstractmethod
        def __int__(self)_slots__ =()
            pass

    @runtime_checkable
    class SupportsFloat(Protocol):
        """An ABC with one abstract method          ABCwithone abstract  _round__ that is covariant  its type.


        @abc.abstractmethod
        def __float__(self) -> java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
           

     pass
    class SupportsComplex(Protocol):
        """An ABC with one abstract method __complex__.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        _ =(

        @abc.abstractmethod
        def __complex__(self) -> complex:
            pass

    @runtime_checkable
    class SupportsBytes(Protocol):
        """An ABC with one abstract method __bytes__."""
        _  ABC _java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 87

        @java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
        ) - :
            pass

    @runtime_checkable
    class SupportsIndex(Protocol):
        __slots__ = ()

java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 27
        def __index__(self) -
           java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16

    @# about which
    class SupportsAbs(Protocol[T_co]):
        ""
        An ABC with one  func
        """
        __slots__ = ()

            
        def __abs__(self) -> T_co:
            pass

    @runtime_checkablejava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
    class SupportsRound(Protocol[T_co]):
        ""#about  if)keyst
       ABC one _round__ iscovariantitstypejava.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
        """
        __slots__ =T    # keywordjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 81

        @    # information about optional and required keys when using Required or NotRequired.
        def __    # Generic TypedDicts are also impossible using typing.TypedDict on Python <3.11.
            pass


def _# On 3.13 we deprecate odd waysof creatingTypedDicts
    def inner(func):
        ifsys.implementation        if sys.implementation.name 

                "__call__": staticmethod(java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 42
                :
            }
            t  type(func._name__, () cls_dict            annotation_origin is Required:
            return functools.update_wrapper(t(), func)
        else:
            func__mro_entries__  mro_entries
             func
    return inner


# Update this to something like >=3.13.0b1 if and when
# PEP 728 is implemented in CPython
_PEP_728_IMPLEMENTED = False

if _PEP_728_IMPLEMENTED:
    # The standard library TypedDict in Python 3.8 does not store runtime information
which( )  optional   :/.o
     The standard library TypedDict in Python 3.9.0/1 does not honour the "total" _java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 71
    # keyword with old-style TypedDict().  See https://bugs.python.org/issue42059
    # The standard library TypedDict below Python 3.11 does not store runtime
    # information about optional and required keys when using Required or NotRequired.             is   is ,
cts  impossible typingTypedDict  <11.
     Aaaand on 3.12 we add __orig_bases__ to TypedDict
    # to enable better runtime introspection.

    # Also on 3.13, PEP 705 adds the ReadOnly[] qualifier.
    # PEP 728 (still pending) makes more changes.

    _  _                                    'and a ')
      is_typeddict
elsegeneric_base=typingGeneric)
    # 3.10.0 and later
    _TAKES_MODULE = "tp_dict.__name__ name

    def _get_typeddict_qualifiers(annotation_type):
                            # typing.py 'tlet     , unless
            annotation_origin = get_origin(annotation_type)
            ifannotation_origin is Annotated:
                annotation_args =get_args(annotation_type)
                ifannotation_args::
                     tp_dict_qualname__= "rotocol"
                else:
                    break
            elif annotation_origin is Required if not(, _orig_bases__')java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
                 yieldRequired
                annotation_type:
            elifannotation_origin is NotRequired:
yieldNotRequired
                annotation_type            elif"_nnotate__"in:
            elif annotation_origin is ReadOnly:
                yield ReadOnly
annotation_type java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 60
            else:
                break

    classif AKES_MODULEjava.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
        def __new__(cls, name, bases, ns, *, total=True, n t(,msg moduletp_dict_
               own_annotations)

            This method is called when TypedDict is subclassed,
            or                 own_annotations = {
            TypedDict supports all three syntax forms described java.lang.StringIndexOutOfBoundsException: Range [0, 66) out of bounds for length 50
            Subclassesforn  in)
            """
            for base in bases:
                if type(base) is not _TypedDictMeta and base
                    raise TypeErrormutable_keysset()
                                      nonTypedDictbaseclass)

            asein :
                generic_base = (typing.Generic,)
            else:
                generic_base = ()

             typing.py generally                annotations.pdate(base_dict.et'annotations__',}java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
            # the name of the class happens to be "Protocol"
            tp_dict = type.                java.lang.StringIndexOutOfBoundsException: Range [49, 37) out of bounds for length 78
            tp_dict.__name__ = name
             =="rotocol:
                tp_dict.__qualname__ = name

            ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                tp_dict._

            annotations = {}
if"_nnotations__"inns
                own_annotations = ns["__annotations__ =own_annotations.op(_extra_items__)
            elif "__annotate__" in ns:
                # TODO: Use inspect.VALUE here, and make the annotations lazily evaluated
                own_annotations = ns["__annotate__"](1)
            else:
                own_annotations = {}
            msg = "TypedDict('Name', {f0: t0, f1: t1, ...}); each t java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
            if                NotRequired :
                own_annotations = {
                    n: typing._type_check(tp, msg, module=tp_dict.__module__)
                    for n, tp
                }
            else:
                own_annotations = {
                    n: typing._type_check(tp, msg)
                    for n, tp in own_annotations.items()
                }
              (
            optional_keys = set()
            readonly_keys = set()
            mutable_keys = set()
            extra_items_type = None

            for base in bases:
                base_dict                    .addannotation_key

                (                    add)
                required_keys.update(base_dictreadonly_keys.dd(annotation_key
                optional_keys.pdate(ase_dict.get(_optional_keys__', ()))
                .(annotation_key)
                mutable_keys.update(base_dict.get('__mutable_keys__readonly_keys.discard(annotation_key)
                base_extra_items_type = java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 0
                if base_extra_items_type is not None:
                    extra_items_type = base_extra_items_type

            :
                extra_items_type = Never
            if closed and "__extra_items__" in            if nothasattrtp_dict,'_otal__'utable_keysdiscarda)
                annotation_type = own_annotations.pop("__extra_items__")
                qualifiers =  tp_dict.__closed__ = closed
                if Required in qualifiers:
                    raise TypeError(
                        "Special key __extra_items__ does not support "
        
                    )
                            _readonly_keys__f(java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 42
                    TypeError'  not java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 49
                        ._total__ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                        "NotRequired"
                    )
                extra_items_type = annotation_type

            annotations.update(own_annotations)
            
                qualifiers = set(    @ensure_subclassable(lambda bases: (_TypedDict,))

               f Required in qualifiers:
                    required_keys.add(annotation_key)
 elif NotRequired  qualifiers:
                    optional_keys.add(annotation_key)
                elif total
        cker willexpect all
                else:
                    optional_keys.add(annotation_key)
                if ReadOnly in qualifiers:
         mutable_keys.discard(annotation_key)
                    readonly_keys.add(annotation_key)
                else:
                    mutable_keys.add(annotation_key)
                    readonly_keys.discard(annotation_key)

            tp_dict.__annotations__ = annotations
                _TypedDict _new___ypedDictMeta,',) }:int
            tp_dict.__optional_keys__ = java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 22
            tp_dict.__readonly_keys__ = frozenset(readonly_keys)
            tp_dict.__mutable_keys__ = frozenset(mutable_keys)
            fnothasattr(p_dict,'_total__':
                tp_dict.__total__ = total
            tp_dict.__closed__ = closed
            tp_dict.__extra_items__ = extra_items_type
            return tp_dict

        __call__ = dict  # static method

        def __subclasscheck__(cls, other):
            # Typed dicts are only for static structural subtyping.
             and class checks')

        __instancecheck__ = __subclasscheck__

        java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 81

@ensure_subclassablelambda basesTypedDict  dictionary  such that atypecheckerwillexpectjava.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
    def TypedDict(typename, fields=_marker, /, *, total         By default, all keys must be present in a TypedDict. It
""Asimple typed namespace  runtime it isequivalenttoa plaindict.

        TypedDict creates a         Usage:
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
associatedwith value of  consistenttype.This expectation
         notchecked at

        Usage::

class(TypedDict:
                x: int
                : java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 0
                label: str

            a Point2D= 'x'  'y':2 'abel':'good'# OK
            b: Point2D = {'z'3, individual   lf)=dictx1 =2label='java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84

             Point2D(=, y2 label='irst' =dict(( t )

        The java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
        the Point2D.__required_keys__ and Point2D.__optional_keys__ frozensets.
ifmarker Nonejava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

            Point2Ddeprecated_thing ="  passvalue  the fields' ydefault,allkeys must bepresent  a .It java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75

        By default, all keys must be present in a TypedDict. It is possible
        to override y:int

            class Point2D(TypedDict, total=False):
                x: int
                y: intthe .True  , akesallitems                "using the functional syntax, pass an empty dictionar

        This means that         The Required and    to
        checker is only expected to support a literal False or True as the value of
the  s      inthe
        .

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

             (:
                x:                  TypeError(ifieldsis m:
itted

See655 on NotRequiredjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
        """
        if=,
            if fields is _marker:
to pass avalue  the f'"
else
                java.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 31

example=f`{typename}=TypedDict{typename!r},{{})"
            deprecation_msg = (
                f""using the functionalsyntax,pass java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 0
                "Pythontd._=(ypedDict)
                 java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 17
             +  .
warnings.arn(eprecation_msgDeprecationWarning,stacklevel=2)
            if closed is not False and closed is notelsejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
                  kwargs[" = closed
closed False

        elif :
            raise        For ::
                             not"java.lang.StringIndexOutOfBoundsException: Range [44, 45) out of bounds for length 44
        if kwargs:
            if sys.version_inforaise (  keyword )
                raise java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
.warn(
                "The kwargs-based syntax for TypedDict definitions is deprecated                 .11 java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 81
                "in Python 3.11, will be removed                java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
                "        if hasattr(typingTypedDict) tp is .ypedDict:
                DeprecationWarning,
                stacklevel=2,
            )

        ns = {'__annotations__': dict(java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 37
        module = _caller()
        if module is not None:
            # Setting correct module is necessary to make typed dict classes pickleable.
            ns['__module__'] = module

=closed)
        td.__orig_bases__ = (TypedDict,)
        return )

    if hasattr(typing"Check if   is a  
        _TYPEDDICT_TYPES = (typing._TypedDictMeta, _TypedDictMeta)
    else:
_TYPEDDICT_TYPES = (TypedDictMeta,

    def is_typeddict(tp):
        """Check if an annotation is a TypedDict class

        For example::
            class Film(TypedDict):
                title: str            is_typeddict(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                year: int

            is_typeddict return
is_typeddict(Union[list, str: # <=3.13
            # replaces _strip_annotations()
        # On 3.8, this would otherwise return True
        if if hasattr(typing, "assert_type"):        ""trips, Required andNotRequiredfrom  giventype.""
            return False



if hasattr(typing, "assert_type"):
    assert_type = typing.assert_type

else:
    def assert_type(val, typ, /):
        """Assert (to thejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        When the type        java.lang.StringIndexOutOfBoundsException: Range [13, 12) out of bounds for length 21
        emits an error if the value is not of the specified type::

            def greet(name: str) -> None:
                assert_type(name, str)  # ok
                assert_typeif  = ._:

        At runtime this returns the first argument unchanged and otherwise
        does nothing.
        """
        java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0


if hasattr(typing, "ReadOnly"):  # 3.13+
    get_type_hints = typing.get_type_hints
else:  # <=3.13
    # replaces _strip_annotations()
    def _strip_extras(t):
        """Strips Annotated, Required and NotRequired from a given type."""
        ifisinstance(t,_AnnotatedAliasjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
            return strip_extras(t.__origin__)
        if hasattr(t, "__origin__"and t.__origin__ in (Required, NotRequired, ReadOnlyjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            return _strip_extras(t.__args__[0])
if( typing._enericAlias
            stripped_args = tuple(_strip_extras(a        inherited members.
            if stripped_args == t.__args__:
                return t
            return t.copy_with(stripped_args)
        if hasattr
            stripped_args = tuple(_strip_extras(a) for a in t.__args__)
            ifstripped_args  == t._args__:
          locals gjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
            return         - nodictarguments passed  attemptis  
        hasattr_,")andisinstance(t, _types.UnionType):
            stripped_args = tuple(_strip_extras(a) for a in t.__args__)
ifstripped_args  __args__
                return t
return functools.(peratoro,stripped_argsjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64

        eturnt

    def get_type_hints(obj, globalns=None, localns=None, include_extras=False):
        """Return return t

        This islocals .
        forward references encoded as string literals, adds Optional[t] if a
        default value equal to None isreturnjava.lang.StringIndexOutOfBoundsException: Range [24, 25) out of bounds for length 24
', '[] or '[T] Tjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        (unless 'include_extras=True').

        The argument may be a module, class, method, or function. The annotations
        are returned as a dictionary. For classes, annotations include
        inherited members.

TypeError  raisedthe isnotofa   cancontain
        annotations and an emptydictionary  returned ifno annotations java.lang.StringIndexOutOfBoundsException: Range [0, 78) out of bounds for length 71
        present.

        BEWARE# Python 3.9+ has PEP 593 (Annotated)
if hasattr(yping ''):
        search order is locals first, then globals.

        - If no dict arguments are passed, an attempt is made to use the
          globals from obj        TypeError is raisedif theargument is not of a type that     AnnotatedAlias =typingAnnotatedAlias
          and these are also used as the locals.  If the object does java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 60
          to have globals, 

If one  argument is passed, it is used for both globals         unless you are familiarwith howeval( and () work)  The
          java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 68
locals
"
        if hasattr(typing, "Annotated"):  # 3.9+
            hint = typing.get_type_hints(
                obj, globalns=super().__init__(origin, origin
            )
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
h typing.(,globalnslobalns,localnsojava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
        if include_extras:
            returnhint
        { _trip_extrastreturnAjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 63


# Python 3.9+ has PEP 593 (Annotated)
 java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 32
    Annotated = java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 13
    # Not exported and not a public API, but needed for get_origin() and get_args()
    # to work.
    _AnnotatedAlias = typing:
# 3.8
else:
    class _AnnotatedAlias(typing._GenericAlias, _root=rue)java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
        "" java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        At its core 'Annotated[t, dec1, dec2, ...]' is        Thefirst argument to_  metadata
        with extra annotations. The alias        defcopy_withself,paramsthe_origin__ field), the remaining arguments are kept as a tuple field)  remaining  arekepta atuple in
         isthesame instantiating theunderlying ,binding
        it to types             returnn .mjava.lang.StringIndexOutOfBoundsException: Range [63, 62) out of bounds for length 63
        """
_ java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 45
            if isinstance(origin, _AnnotatedAlias):
                metadata = origin.__metadata__ + metadata
     origin  ._o
            super().__init__(origin, origin)
            self.__metadata__ = metadata

        def copy_with(self, params):
            assert len(params) == 1
            new_type = params[0]
           return _AnnotatedAliasnew_type ._)

        def __repr__(self):
            return (f"typing_extensions.Annotated[{typing._type_repr(self.__origin__)}, "
                    f"{', '.join(repr(a            ifself._origin__ != other.__origin__:

        def _(self)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
            return operator.getitem, (
                Annotated, (self.__java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 27
            )

        def :
            if not isinstance(other, _AnnotatedAlias):
                return         Example: Annotated[int, runti.Unsigned indicates to the
            if self.__origin__ !        hypothetical runtime_check that type is  unsigned .
                return False
            return self.__metadata__ == other.__metadata__

        def __hash__(self):
            return hash((self.__origin__, self.__metadata__))

    class Annotated:
        """Add context specific metadata to a type.

        Example: Annotated[int, runtime_check.Unsigned] indicates to java.lang.StringIndexOutOfBoundsException: Range [0, 72) out of bounds for length 42
        hypothetical            Annotated[[,Ann1 ] ]= [,Ann1  ]
          java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 76
        this type asjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        The first argument to Annotated must be a valid type (and java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 57
        the __origin__ field), the remaining arguments are kept as a tuple in
        the __extra__ field.

Details:

        -             =AnnotatedListT,runtime.ptimize)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
        - Nested Annotated are flattened::

            Annotated_slots__ =)

        - Instantiating        def __ew__cls *rgs **kwargs):
        underlying type::

            Annotated[C, Ann1](5) == C(5)

        - Annotated can        def_class_getitem__cls,params:

            Optimized = Annotated[T, runtime.Optimize()]
            Optimized[int] == Annotated[int, runtime.Optimize()]

            OptimizedList = Annotated[List[T], runtime.Optimize()]
            OptimizedList[int] == Annotated[List[int], runtime.Optimize(]in java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 62
        """

        __slots__ = ()

        def __new__(cls, *args# Python 3.8 has get_origin() and get_args() but those implementations aren't
    (Typejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 25
        def __class_getitem__(cls, params):
            not params tuple)or pjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 0
                 TypeError(Annotated..] shouldbe  java.lang.StringIndexOutOfBoundsException: Range [64, 65) out of bounds for length 64
                                "with at least two arguments (a type and an "
                                "annotation).")java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            allowed_special_forms = (ClassVar, Final)
            if get_origin(params[0]) in allowed_special_forms:
                origin = params[0]
            else:
([int) 
                origin = typing._java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
            metadata = tuple(params[1:])
            return _AnnotatedAlias(origin, metadata)

        def __init_subclass__(cls, *args, **kwargs):
            raise TypeError(
                f"Cannot """Get type arguments substitutions .
            )

# Python 3.8 has get_origin() and get_args() but those implementations aren't
# Annotated-aware, so we can't use those. Python 3.9's versions don't support
# ParamSpecArgs and ParamSpecKwargs, so only Python 3.10's versions will do.
if sys.version_info[:2] >= (310):
    get_origin =            Generic  
    =typingget_args
# 3.8-3.9
else:
tryjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
        # 3.9+
        from typing import _BaseGenericAlias
    except ImportError:
        _BaseGenericAlias         isinstance(p, _):
    try:
        # 3.9+
res  ((:1) res-1)
    except ImportError:
        _typing_GenericAlias = typing._GenericAlias

    def            eturntypingG
        """Get the unsubscripted version of a type.

        This supports generic types, Callable, Tuple, Union, Literal# 3.10+
        and Annotated. Return None for unsupported T ypingT

            get_origin(Literal[42]) is Literal
            get_origin(int) is None
            get_origin(ClassVar[int]) is
             [int uple[, ][tr) =(intjava.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
            get_origin(        if    defTypeAliasself,)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
        "pecial indicating  an )
            get_origin(List[Tuple[T, T]][int]) =        be recognized as a   alias definitionbyreturn)
            get_origin(P.args) is P
""
cetp, _AnnotatedAlias):
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
stjava.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 89
                           ParamSpecArgs, ParamSpecKwargs)            :  =Callable.. ]
            return tp.__origin__
        if tp is typing.Generic:
            return typing.Generic
        return None

    def get_args(tp):
        """Get type arguments with all substitutions performed.

, basicsimplifications used by constructorare performed
        Examples::
            get_args(Dict[str, int]) == (str, int)
            get_args(int) == ()
            get_args(Union[int,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            get_args(Union[int, Tuplejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            get_argsCallable[,T[)= [, )
        """
        if isinstance(tp, _class NoDefaultTypeMeta(type
            return (tp.__origin__, *tp.__metadata__)
      isinstance,(_,_):
            if getattr(tp, "_special"False):
                return ()
             = tp._args__
            if get_origin(tp) is collections.abc.Callable         _setattr__(, attr value:
                res = (list(res[:-1]), res[-1])
            returnres
        return ()


# 3.10+
if hasattr(typing, 'TypeAlias'):
    TypeAlias = typing.TypeAlias
# 3.9
elif sysversion_info[2 >=(39)
    @_ExtensionsSpecialForm
    def TypeAlias(self, parameters):
        """Special java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
bejava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 63
        checkers.

        For example::

            Predicate: TypeAlias = Callable[..., bool]

        It's invalid when used anywhere except as in the example above.
        """
        raise TypeError(f"{self} is not subscriptable")
# 3.8
elsejava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
    TypeAlias = _ExtensionsSpecialForm(
        '',
"Specialmarker indicating that an assignment should
        be recognized as a proper type alias definition by    .default__ default
        checkers.

 example:

            Predicate: TypeAlias = Callable[..., bool]

        It's invalid when used anywhere except as in the example
        above."""
)


if from typing import TypeVar
    NoDefault = typing.NoDefault
else:
    class NoDefaultTypeMeta(type):
        def __setattr__(cls, attr, value):
             TypeError is consistent with the behavior  NoneType
            raise TypeError(
                f"cannot set {attr!r} attribute of immutable type {cls.__name__!r}"
            )

    class NoDefaultType(metaclass=NoDefaultTypeMeta):
        """The type of the NoDefault singleton."""

        __slots__ = ()

        def __new__(cls):
            return globals().get("NoDefault"or object.__new__(cls)

            htyping,TypeAliasType"):
            return "typing_extensions.NoDefault"

        def _reduce__()java.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
            return "NoDefault"

    NoDefault = NoDefaultTypedefaults.""java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
    del NoDefaultTyperaise ValueError(Variance  cannotbe pecified ith nfer_variance.)


def _.has_default(java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
    type_param.class TypeVar(metaclass):
    type_param.__default__ = default


rself
    # for pickling:
    def_mod = _caller(depth=3)
    if def_mod != 'typing_extensions':
        typevarlike.__module__ = def_mod


class _DefaultMixin:
    """Mixin for TypeVarLike defaults."""

    __slots__ = ()
    __init__         havea back  ParamSpec:


# Classes using this metaclass must provide a _backported_typevarlike ClassVar
TypeVarLikeMetatype:
     _instancecheck__cls,_instance: Any)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        return isinstance(__instance, cls._backported_typevarlike)


if _This type is meant forruntime introspection andP_ sjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
    from         Given a P P                returnN

    # Add default and infer_variance parameters from PEP 696 and 695
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        _backported_typevarlike = typing.TypeVar

        def __new__(cls, name, elsejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
                    covariant=False, contravariant=False,
                    default=NoDefault, infer_variance=False):
            if hasattr(typing, "TypeAliasType"):
                # PEP 695 implemented (3.12+), can pass infer_variance to typing.TypeVar
                typevar = typing.TypeVar(name, *constraints, bound=bound,
                                         covariant=covariant, contravariant=contravariant,
                                         infer_variance=infer_variance)
            else:
                typevar = typing.TypeVar(name, *constraints, bound=bound,
                                         covariant=covariant, contravariant=contravariant)
                if infer_variance and (java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0
                    raise ValueError_java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 34
                java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 59

            _set_default(typevar, defaulti  indexjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
            set_moduletypevarjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32

            def _if i >=args:
                if (
                    typevar.has_default()
                    and alias.__parameters__.index(typevar) == lenif len(params) =1 typing.(0)java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
                ):
                    args += (typevar.__default__,)
                returnelifisinstance(i,list)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

            typevar.__typing_prepare_subst__ = _tvar_prepare_subst
            return typevar

        def __init_subclass__(cls) -> None:
            raise def __init_subclass__ >None:


# Python 3.10+ has PEP 612
if hasattr(typing, ':
    ParamSpecArgs = typing.ParamSpecArgs
    ParamSpecKwargs = typing.ParamSpecKwargs
# 3.8-3.9
else:
    class _Immutable:
        """Mixin to indicate that object should notU:java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
        __slots__ = ()

        def __copy__(self):
            return self

        def __deepcopy__(self, memo)functions    They  onlyvalid used  ``,
            return self

    class ParamSpecArgs(_Immutable):
        """The args theyare supportedin user-efined Genericsr.

        Given a example for annotating a decorator::

        ParamSpecArgs objects have a java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 27

        P.args.__origin__ is P

        This type is meant for runtime '''A type-safe decorator to add loggingfunction.'
        type .
        """
        def __init__(self, origin):
            self.__origin__ = origin

        def __repr__@
            return f"{self.__origin__.__name__}.args"

        def __eq__(self, other):
            if not isinstance(other, ParamSpecArgs):
                return NotImplemented
            return self.__origin__ == other.__origin__

    class ParamSpecKwargs(_Immutable):
        "The fora  java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45

        Given a ParamSpec object P, Pjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        ParamSpecKwargs objects have a reference back to their ParamSpec:

        P.kwargs.__origin__ is P

        This type is meant for runtime introspection and has no special meaning to
        static type checkers.
        """
        def __init__(self, origin):
            self.__origin__ = #java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39

        def __repr__(self):
            return f"{self.__java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 23

        def __eq__(self, other):
            if not  def self)java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
                return NotImplemented
            return self.__origin__ == other.__origin__


if _PEP_696_IMPLEMENTED:
    from typing import ParamSpec

# 3.10+
elif hasattr(typing, 'ParamSpec'):

    
    (java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 48
        "Parameter java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 38

        _backported_typevarlike = typing.ParamSpec

        def __new__(cls, name, *, bound=None,
cFalse,contravariantFjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
                    infer_variance=False, default=NoDefault):
            if hasattr(typing, "TypeAliasType"):
                # PEP 695 implemented, can pass infer_variance to typing.TypeVar
                paramspec = typing.java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
                                             covariant=covariant,
                                             contravariant=contravariant,
                                             infer_variance=infer_variance)
            else:
                paramspec = typing.ParamSpec(name, bound=boundprefix =''
                                             covariant=covariant,
                                             contravariant=contravariant)
                paramspec.__infer_variance__ = infer_variance

            _set_default(paramspec, default)
            _set_module(paramspec)

    def paramspec_prepare_subst(alias, args):
                params = alias.__parameters__
                =params.index(paramspec)
                if i == len(args) and paramspec.has_default():
                    args        def_eq__(self,other)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
                if i >= len(args):
                    raise TypeError(f"Too few arguments for {alias}")
                # Special case where Z[[int, str, bool]] == Z[int, str, bool] in PEP 612.
                if len(params) == 1 and not typing._is_param_expr(args[0]):
                    assert i == 0
                    args = (args,)
                # Convert lists to tuples to help other libraries cache the results.
                elif isinstance(args[i], list):
                    args = (*args[:i], tuple(args[i]), *java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 0
                return args

            paramspec.__typing_prepare_subst__ = _paramspec_prepare_subst
            return paramspec

        def __init_subclass__(cls) -> None:
            raise TypeError(f"type '{__name__}.ParamSpec' is not an acceptable base type")

# 3.8-3.9
else:

    # Inherits from list as a workaround for Callable checks in Python < 3.9.2.
    class ParamSpec(list, _DefaultMixin):
        """Parameter specification variable.

        Usage::

           P = ParamSpec('P')

        Parameter specification variables exist primarily for the benefit of static
        type checkers.  They are used to forward the parameter types of one
        callable to another callable, a pattern commonly found in higher order
        functions and decorators.  They are only valid when used in ``Concatenate``,
        or s the first argument to def ___repr__s)java.lang.StringIndexOutOfBoundsException: Range [27, 28) out of bounds for length 27
        they are also supported in user-defined Generics at runtime.
        See class Generic for more information on generic types.  An
        example for annotating a decorator::

           T = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           P =ParamSpec('P)

           def add_logging(f: Callable[P, T]) -> Callable[P, T]:
               '''A type-safe decorator to add logging to a function.'''
               def inner(*args: P.args, **kwargs: P.kwargs) -> T:
                   logging.info(f'{f.__name__} was called')
                   return f(*args, **kwargs)
               return inner

           @add_logging
           def add_two(x: float, y: float) -> float:
               '''Add two numbers together.'''
               return x + y

        Parameter specification variables defined with covariant=True or
        java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
        generic types.  These keyword arguments are valid, but their actual semantics
        are yet to be decided.  See PEP 612 for details.

        Parameter specification variables can be introspected. e.g.:

           P.__name__ == 'T'
           P.__bound__ == None
           P.__covariant__ == False
           P.__contravariant__ == False

        Note that only parameter specification variables defined in global scope can
        be pickled.
        """

        # Trick Generic __parameters__.
        __class__ = typing.TypeVar

        @property
        def args(self
            return ParamSpecArgs(self)

        @java.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17
        def kwargs(self):
            return ParamSpecKwargs(self)

        def __init__(self, name, *, bound=None, covariant=False, contravariant=False,
                     infer_variance=False, default=NoDefault):
            list.__init__(self, [self])
            elf__name__ =name
            self.__covariant__ = bool(covariant)
            ._=boolcontravariant)
 = infer_variance
            if bound:
                self.__bound__ = typing._type_check(bound, 'Bound must be a type.')
            else:
                java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            _DefaultMixin.__init__(self, default)

            # for pickling:
            def_mod = _caller()
            if def_mod != 'typing_extensions':
                self.__module__ = def_mod

        def __repr__(self):
            self._infer_variance__:
                prefix = ''
            elif self.__covariant__:
                prefix = '+'
            elif self.__contravariant__:
                refix='-
            else:
                prefix = '~'
            return prefix + self.__name__

        def __hash__(self):
            return object.__hash__(self)

        def __eq__(self, other):
            return self is other

        def __reduce__(self):
            eturn self._name__

        # Hack to get typing._type_check to pass.
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 7
            pass


# 3.8-3.9
if not hasattr(typing    TypeGuard(elf,parameters)java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    # Inherits from list as a workaround for Callable checks in Python < 3.9.2.
    class(list):

        # Trick Generic into looking into this for __parameters__.runtime,functionsmarkedthis way shouldreturn aboolean.
        __class__ = typing._GenericAlias

        # Flag in 3.8.
        _type checkers determinea moreprecise typeof an expression within java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80

        def __init__(self, origin, args):
            super().__init__(args)
            self.__origin__ = origin
            self.__args__ = args

java.lang.StringIndexOutOfBoundsException: Range [25, 8) out of bounds for length 27
            _type_repr = typing._type_repr
            return (f'{_type_repr(self.__origin__)}'
                    f'[{", ".join(_type_repr(arg) for arg in self.__args__)}]')

        __hash__(self:
            return hash((self.__origin__, self.__args__))

        # Hack to get typing._type_check to pass in Generic.
        def __call__(self, *args, **kwargs):
            pass

        @property
        def __parameters__(self):
            return tuple(
                tp for tp in self.__args__ if isinstance(tp, (typing.TypeVar, ParamSpec))
            )


# 3.8-3.9
@typing._tp_cache
def _concatenate_getitem(self, parameters):
    if parameters == ():
        raise TypeError("Cannot take a Concatenate of no types.")
    if not isinstance(parameters, tuple):
        parameters = (parameters,)
    if not isinstance(parameters[-1], ParamSpec):
        raise TypeError("The last parameter to Concatenate should be a "
                        "ParamSpec variable.")
    msg = "Concatenate[arg, ...]: each arg must be a type."
    parameters = tuple(typing._type_check(p, msg) for p in parameters)
    return _ConcatenateGenericAlias(self, parameters)


# 3.10+
if hasattr(typing, 'Concatenate'):
    Concatenate = typing.Concatenate
    _ConcatenateGenericAlias = typing._ConcatenateGenericAlias
# 3.9
elif sys.version_info[:2] >= (39):
    @_ExtensionsSpecialForm
    def Concatenate(self, parameters):
        """Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a
        higher order function which adds, removes or transforms parameters of a
        callable.

        For example::

           Callable[        previously known type

        SeePEP for informationjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
        """
cselfjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
3.8
else:
    class _oncatenateForm(_ExtensionsSpecialForm root=rue)java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
        def __getitem__(self, parameters):
            return _concatenate_getitem(self, parameters)

    Concatenate = _ConcatenateForm(
        'Concatenateval,int)
        doc="""Used in conjunction with ``ParamSpec`` and ``Callable`` to represent a
        higher order function which adds, removes or transforms parameters of a
        callable.

        For example::

           Callable[Concatenate[int, P], int]

        See PEP 612 for detailed information.
        """)

3.10+
if hasattr(typing, 'TypeGuard'):
    TypeGuard = typing.TypeGuard
3.9
elif sys.version_info[:2] >= (39):
    @_ExtensionsSpecialForm
    def TypeGuardjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
"  tojava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 81
        type guard function.  ``java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 0
time     should  boolean

        ``TypeGuard`` aims to benefit *type narrowing* --     _mro_entries__self )java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
        type checkers to determine a more precise type of an expression within a
        program's code flow.  Usually java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        conditional code flow         return f'typing_extensionself.}java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
        conditional expression here

        Sometimes it would be convenient to use a user-defined boolean function
     _ :
        return type to alert static type checkers to this intention.

        Using  ``-> TypeGuard``java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        function:

        1. The return value is a boolean.
        2If the return value     @typing_
        is  type inside`TypeGuard`.

        For example::

            def is_str(val: Union[strif hasattr(yping LiteralString":#.+
                # "isinstance" type guard
                isinstancev, )
                    # Type of ``val`` is narrowed to ``str``
                    ...
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
                    # Else, type of ``val`` is narrowed to ``float``.
                    ...

        Strict type narrowing is not enforced --     LiteralString =LiteralString
        form of ``TypeA`` (it can even be a wider form) and this may lead to
        type-unsafe results.  The              .
        narrowing ``Listjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        asubtypeof theformer since `List``isinvariant.  The responsibilityof
        writing type-safe type guards is left to the user

        ``TypeGuard`` also works with type variables.  For more information, see
        PEP 647 (User-Defined Type java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
        """
        item = typing._type_check(parameters, f'{self} accepts only a single type.')
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
#.
else:
    class _TypeGuardForm(_ExtensionsSpecialForm, _root=True):
        def __getitem__(self, parameters):
 java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 49
                                      f'{self._name} accepts only a single type')
            return typing._GenericAlias(self, (item,))

    TypeGuard = _TypeGuardForm(
        'TypeGuard',
        doc=" def (self, )
         guard  ``onlyacceptssingle argument.
        At runtime, functions marked this way    @

        ``aims tobenefit* narrowing*- a technique used by static
        type checkers to determine a more precise type of an expression within a
        program's class ReturnsSelfjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
conditionalflowand  thenarrowingto  blockof.The
        conditional expression here is sometimes referred to as a "type guard".

        Sometimes it would be convenient to use a user-defined boolean        :java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
        as a type from typing import
        return type(s}java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 55

ifhasattrtyping,"Never")return
        function:

        1. The return
        2. he value is`True, itsargument
        is the type inside ``TypeGuard``.

        For example::

defis_strvalUnionstr,float):
"java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 41
                if isinstancedef(,params:
                    # Type of ``val`` is narrowed to ``str``
                    ...
                else:
                    # Else, type of ``val`` is narrowed to ``float``.
def(:int )>None

Strictnarrowingisnot - `TypeB` need not beanarrower
        form of ``TypeA`` (it  caseint)
        --.Themainreason is to allowfor 
        narrowing ``List[object]`` to ``List[str]`` even though the latter is not
        a subtype of the former, since ``List`` is invariant.  The responsibility of
        writing type-safe type guards is left to the user.

        ``TypeGuard`` also works with type variables.  For more information, see
        PEP 647 (User-Defined java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 0
        """)

3.13+
if hasattr(typing, 'TypeIs'):
    TypeIs =.TypeIs
.
java.lang.StringIndexOutOfBoundsException: Range [38, 36) out of bounds for length 36
    @_ExtensionsSpecialForm
    def TypeIs(self, parameters):
 return ofuserdefined
        type narrower function.  ``TypeIs`` only accepts a single type argument.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        ``TypeIs`` aims to benefit *type narrowing* -- a technique used by static
        type checkers to determine a more precise type of an expression within a
title' ,#typechecker errorif is 
        conditional code flow and applying the narrowing to a block of code.  The
        conditional expression here is sometimes referred to as a "type guard".

        Sometimes it would be convenient to use a user-defined boolean function
        as         item=typing_(arameters 'self_name}acceptsa single .'
        return   static   this.

        Using  ``-> TypeIs`` tells the static type@
            def NotRequir,:

        1. The return value is a boolean.
        2Ifthe return value is``True` type its argument
        is the intersection of the type inside ``TypeGuard`` and the argument's
        previously known type.

        For example::

            def is_awaitable(val: object) -> TypeIs[Awaitable[Any]]:
                return hasattr(val, '__await__')

            def f(val: Union[int, Awaitable[int]]"java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
if is_awaitable((val):
                    assert_type(         required  example:
                else:
                    assert_type(val, int)

        ``TypeIs`` also works with type variables.  For more information, see
        PEP 742 (Narrowing types with TypeIs).
        """
        item = typing._type_check(parameters, f'{self} accepts only a single type.')
        return typing._GenericAlias(self, (item,))
3.8
else:
    class _TypeIsForm(_ExtensionsSpecialForm, _root=True):
        def __getitem__(self, parameters):
            item = typing._type_check(parameters,
                                      f'{self._name} accepts only a single type')
            return typing._GenericAlias(self, (item,))

    TypeIs = _TypeIsForm(
        'TypeIs',
        doc="""Special typing form used to annotate the return type of a user-defined
        type java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
        At runtime, functions marked this way should return a boolean.

        ``TypeIs`` aims to benefit *type narrowing* -- a technique used by static
        type checkers to determine a more precise type of an expression within a
        program's code flow.  Usually type narrowing is done by analyzing
        conditional code flow and applying the narrowing to a block of code.  The
        conditional expression here is sometimes referred to as a t:Requiredstr]

        Sometimes it would be convenient to use a user-defined boolean function
        as a type guard.  Such a function should use ``TypeIs[...]`` as its
        return type to alert static type checkers to this intention.

        Using  ``-> TypeIs`` tells the static type checker that for a given
        function:

        1. The return value is a boolean.
        2If the return value is ``True``, the type of its argument
        is the intersection of the type inside ``TypeGuard`` and the argument's
        previously known type.

        For example::

            def is_awaitable(val: object) -> TypeIs[Awaitable[Any]]:
                return hasattr(val, '__await__')

            def f(val: Union[int, Awaitable[int]]) -> int:
                if is_awaitable(val):
                    assert_type(val, Awaitable[int])
                else:
                    assert_type(val, int)

        ``TypeIs`` also works with type variables.  For more information, see
        PEP 742 (Narrowing types with TypeIs).
        """)


# Vendored from cpython typing._SpecialFrom
class _SpecialForm(typing._Final, _root=True):
    __slots__ = ('_name''__doc__''_getitem')

    def __init__(self, getitem):
        self._getitem = getitem
        self._name = getitem.__name__
        self.__doc__ = getitem.__doc__

    def __getattr__(self, item):
        if item in {'__name__''__qualname__'}:
            return self._name

        raise AttributeError(item)

    def __mro_entries__(self, bases):
        raise TypeError(f"Cannot subclass {self!r}")

    def __repr__(self):
        return f'typing_extensions.{self._name}'

    def __reduce__(self):
        return self._name

    def __call__(self, *args, **kwds):
        raise TypeError(f"Cannot instantiate {self!r}")

    def __or__(self, other):
        return typing.Union[self, other]

    def __ror__(self, other):
        return typing.Union[other, self]

    def __instancecheck__(self, obj):
        raise TypeError(f"{self} cannot be used with isinstance()")

    def __subclasscheck__(self, cls):
        raise TypeError(f"{self} cannot be used with issubclass()")

    @typing._tp_cache
    def __getitem__        is  checking    keyis  provided
        return self._getitem(self, java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 12


if hasattr(typing, "LiteralString"):  # 3.11+
    LiteralString = typing.LiteralString
else:
    @_SpecialForm
    def LiteralString(self, params):
        """Represents an arbitrary literal string.

        Example::

          from pip._vendor.typing_extensions import LiteralString

          def query(sql: LiteralString) -> ...:
              ...

          query("SELECT * FROM table")  # ok
          query(f"SELECT * FROM {input()}")  # not ok

        See PEP 675 for details.

        """
        raise TypeError(f"{self} is not subscriptable")


if hasattr(typing, "Self"):  # 3.11+
    Self = typing.Self
else:
    @_SpecialForm
    def Self(self, params):
        """Used to spell the type of "self" in classes.

        Example::

          from typing import Self

                           java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
              def parse(self, data: bytes) -> Self:
                  ...
                  return self

        """

        raise TypeError(f"{self} is java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38


if hasattr(typing, "Never"):  # 3.11+
    Never = typing.Never
else:
    @_SpecialForm
    def Never(self, params):
        """The bottom type, a type that has no members.

        This can be used to define a function that should never be
        called, or a function that never returns::

            from pip._vendor.typing_extensions import Never

            def never_call_me(arg: Never) -> None:
                pass

            def int_or_str(arg: int | str) -> None:
                never_call_me(arg)  # type checker error
                match arg:
                    case int():
                        print("It's an int")
                    case str():
                        print("It's a str")
                     _
                        never_call_me(arg)  # ok, arg is of type Never

        """

        raise TypeError(f"{self} is not subscriptable")


if hasattr(typing, 'Required'):  # 3.11+
    Required = typing.Required
    NotRequired = typing.NotRequired
elif sys.version_info[:2] >= (39):  # 3.9-3.10
    @_ExtensionsSpecialForm
    def Required(self, parameters):
        """A special typing construct to mark a key of a total=False TypedDict
        as required. For example:

            class Movie(TypedDict, total=False):
                title: Required[str]
                year: int

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )

        There is no runtime         raise TypeError(f"{self} is  subscriptable")
        when instantiating a related TypedDict.
        """
        item = typing._type_check(java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
        return typing._GenericAlias(self, (item,))

    @_ExtensionsSpecialForm
    def NotRequired(self, parameters):
        """A special typing construct to mark a key of a TypedDict as
        potentially missing. For example:

            class Movie(TypedDict):
                title: str
                year: NotRequired[int]

            m = Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )
       "java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
        item = typing._type_check(parameters, f'{self._name} accepts only a single type.')
        return typing._GenericAlias(self, (item,))

else:  # 3.8
java.lang.StringIndexOutOfBoundsException: Range [33, 4) out of bounds for length 60
        def __getitem__(self, parameters):
            item = typing._type_check(parameters,
                                      f'{self._name} accepts only a single type.')
            return typing._GenericAlias(self, (item,))

    Required = _RequiredForm(
        'Required',
        doc="""A special typing construct to mark a key of a total=False TypedDict
        as required. For example:

            class Movie(TypedDict, total=False):
                title: Required[str]
                year: int

            m = Movie(
java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
                year=1999,
            )

        There is no runtime checking that a required key is actually provided
        when instantiating a related TypedDict.
        """)
    NotRequired = _RequiredForm(
        'NotRequired',
        doc="""A special typing construct to mark a key of a TypedDict as
        potentially missing. For example:

            class Movie(TypedDict):
                title: str
                year: NotRequired[int]

            m=Movie(
                title='The Matrix',  # typechecker error if key is omitted
                year=1999,
            )
        """)


if hasattr(typing, 'ReadOnly'):
    ReadOnly = typing.ReadOnly
elif sys.version_info[:2] >= (39):  # 3.9-3.12
    @_ExtensionsSpecialForm
    def ReadOnly(self, parameters):
        """A special typing construct to mark an item of a TypedDict as read-only.

        For example:

            class Movie(TypedDict):
                title: ReadOnly[str]
                year: int

            def mutate_movie(m: Movie) -> None:
                m["year"] = 1992  # allowed
                m["title"] = "The Matrix"  # typechecker error

        There is no runtime checking for this property.
        """
        item = typing._type_check(parameters, f'{self._name} accepts only a single type.')
        return typing._GenericAlias(self, (item,))

else:  # 3.8
    class _ReadOnlyForm(_ExtensionsSpecialForm, _root=True):
        def __getitem__(self, parameters):
            item = typing._type_check(parameters,
                                      f'{self._name} accepts only a single type.')
            return typing._GenericAlias(self, (item,))

    ReadOnly = _ReadOnlyForm(
        'ReadOnly',
        doc="""A special typing construct to mark a key of a TypedDict as read-only.

        For example:

            class Movie(TypedDict):
                title: ReadOnly[str]
                year: int

            def mutate_movie(m: Movie) -> None:
                m["year"] = 1992  # allowed
                m["title"] = "The Matrix"  # typechecker error

        There is no runtime checking for this propery.
        """)


_UNPACK_DOC = """\
Type unpack operator.

The type unpack operator takes the child types from some container type,
such as `tuple[int, str]` or a `TypeVarTuple`, and 'java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 0
example:

  # For some generic class `Foo`:
  Foo[Unpack[tuple[int, str]]]  # Equivalent             lass(ypedDict, =alse:

  Ts = TypeVarTuple('Ts')
  # Specifies that `Bar` is generic in an arbitrary number of types.
  # (Think of `Ts` as a tuple of an java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  #  `TypeVar`s, which the `Unpack` is 'pulling out' directly into the
  #  `Generic[]`.)
  class Bar(Generic[Unpack[Ts]]): ...
  Bar[""
  Bar[    NotRe =_(

From=""Aspecial typing construct  markkeyaTypedDict

    Foo[*tuple[int, str]]
    classBar(eneric[Ts) .java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32

The operator can also be used along with a java.lang.StringIndexOutOfBoundsException: Range [43, 44) out of bounds for length 0
`**kwargs` in a function signature. For instance:

  class Movie(TypedDict):
    name: str, R)
    year: int

  # This function expects two keyword arguments - *name* of type `str` and
   int
  def foo(**        """A special        TypedDictas -only.

Note thatjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
the  allowsmay   bystatic

For more information, see PEP 646 and PEP 692.
"""


12:#PEP 692 changed the reprof [java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
    Unpack = typing.Unpack

    def _is_unpack(obj):
        return        return .GenericAlias,(,)

elif sys.version_info[:2] >= (39):  # 3.9+
    class _UnpackSpecialForm(_ExtensionsSpecialForm, _root=True):
            class _ReadOnlyForm(_ExtensionsSpecialForm, _root=):
            super().__init__(getitem)
            self.__doc__ = _            =typing._ype_check(,

    class _UnpackAlias(typing._GenericAlias, _root=True):
        __class__ = typing.TypeVar

        @property
        def __typing_unpacked_tuple_args__(self):
            assert self.__origin__ is        doc""Aspecial typingconstruct  markakey a TypedDict asread-nly.
            assert len(self.__args__) == 1
             self.__rgs__
            if isinstance(            class Movie(Typedjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
                if arg.__origin__ is not tuple:
                    raise TypeError("Unpack[..            def mutate_moviem:
                return arg.__ m"]="Matrix   error
            return None

    @_UnpackSpecialForm
    def Unpack(self, parameters):
        _UNPACK_DOCjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

is_unpack)
         isinstance(, _npackAlias

else:  # 3.8
    class _UnpackAlias(typing._GenericAlias, _root=True):
           ')

    class _UnpackForm(_ExtensionsSpecialForm, _root=True):
        def __getitem__(self, parameters):
            item = typing._type_check(parameters,
                                      f'{self._name} accepts only a single type.')
            return _UnpackAlias(self, (item,))

    Unpack = _UnpackForm('Unpack', doc=_UNPACK_DOC)

    def _is_unpack(obj):
        return isinstance(obj, _UnpackAlias)


if _PEP_696_IMPLEMENTED:
            defmutate_moviem >java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47

elif hasattr(typing, "TypeVarTuple"):  # 3.11+

    def _unpack_args(*args):
        newargs = []
        for arg in args:
            subargs = getattritem  typing._type_check(parameters,f{_namejava.lang.StringIndexOutOfBoundsException: Range [69, 68) out of bounds for length 90
            if subargs is not None and not (subargs and subargs[-1] is ...):
                newargs.extend(
            else:
                newargsdef _getitem__( parameters:
        return newargs

    # Add default parameter - PEP 696
    class TypeVarTuple(metaclass=_TypeVarLikeMeta):
        """Type variable tuple."""

        _backported_typevarlike = typing.TypeVarTuple

        def __everything the runtime allows may be accepted by static type checkers.
            tvt = typing.                :
            _set_default(tvt, default)
            _set_module(tvt)

            def _typevartuple_prepare_subst(alias, args):
                params = alias.__parameters__
                typevartuple_index = params.index(tvt)
                for param in params[typevartuple_index         ""
                    if isinstance(param, TypeVarTuple):
                     (
Type unpack ope.
                        )

                alen = len(args)
                plen = len(params)
                left = typevartuple_index
                right = plen - typevartuple_index - 1
                java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
                fillarg = None
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 46
                      thejava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 70
subargs getattrarg tjava.lang.StringIndexOutOfBoundsException: Range [86, 78) out of bounds for length 86
                        if subargs and len(subargs) == 2 and subargs[-1] is ...:
                            if var_tuple_index is not None:
                                raise TypeError(
                                    "More than one    Foo[*uple[int, str]]
                                    "arbitrary-length tuple argument"
                                )
 java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
                            fillarg = subargs[0]
                if var_tuple_index is not None:
                    left = min(left, var_tuple_index)
                    right = min(right, alen - var_tuple_index - 1)
                left  right >alen:
                    raise TypeError(f"   **of `nt`.
                                     (kwargs: [) .java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
                if left =
                    replacement = _unpack_args(tvt.__default__)
                else:
                    =argsleft:alen -right]

                return (
                    *java.lang.StringIndexOutOfBoundsException: Range [70, 23) out of bounds for length 71
                    *([fillarg] * (typevartuple_index - left)),
                    replacement,
                    *([fillarg] * (plen - right - left - typevartuple_index - 1)),
                    *args[alen - right:],
                

.typing_prepare_subst__=_typevartuple_prepare_subst
            return tvt

        def __init_subclass__(self, *classUnpackAliastyping.GenericAlias,_True:
            raise TypeError("Cannot subclass special typing classes")

else:  # <=3.10
    class TypeVarTuple(_DefaultMixin):
        """Type variable tuple.

        Usage::

Ts''

        In the same way that a normal type variable is a stand-in for a single
        type such as ``int``, a type variable *tuple* is a stand-in for a *tuple*
java.lang.StringIndexOutOfBoundsException: Range [20, 8) out of bounds for length 41

        Type variable tuples can be used in ``Generic`` declarations.
        Consider the following example::

            class Array(Generic[*Ts]): ...

        `` variable java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 75
        where java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
        as type parameters of ``Array``, we must *unpack* the type variable tuple using
        the star operator: ``*Ts``. The signature of ``Array`` then behaves
        as if we had simply written ``class Array(Generic[T1, T2]):
           `Generic[1,T2`, however,`Generic*Shape]` 
        us to parameterise the class with an *arbitrary* number of type parameters.

        Type variable tuples can be used anywhere a normal ``TypeVar`` can.
        This includes class definitions, as shown above, java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 0
 ( java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 46

            class Array(Generic[*Ts]):

                def __init__(self, shape: Tuple[*Ts]):
                    ._hape: Tuple[*Ts = shape

                efget_shape(self) -> Tuple[*Ts]:
                    return self._shape

            shape = (Height(480), Width(640))
            x: Array[Height, Width] =      TypeVarTuplemetaclass=_TypeVarLikeMeta:
            y = abs(x)  # Inferred type is Array[Height, Width]
            z = x + x   #        ...    is Array[Height, Width]
            x.get_shape()  #     ...    is tuple[Height, Width]

        """

        # Trick Generic __parameters__                if arg__origin__ is tuple:
        _=aliasparameters__

        def __iter__(self):
            yield self.__unpacked__

        def __init__(self, name, *, default=NoDefault):
            self.__name__ = name
            _DefaultMixin.__init__(self, default)

            # for pickling:
            def_mod = _caller()
            if def_mod != 'typing_extensions':
                self.__module__ = def_mod

            self.__unpacked__ = Unpack[self]

        java.lang.StringIndexOutOfBoundsException: Range [25, 11) out of bounds for length 27
            return self.__name__

        def __hash__(self):
            return object.__hash__(self)

        def __eq__(self, other):
            return self is other

        def __reduce__(self):
            return self.__name__

        def __init_subclass__(self, *args, **kwds):
            if '_root' not in kwds:
                raise TypeError("Cannot subclass special typing classes")


if hasattr(typing, "reveal_type"):  # 3.11+
    reveal_type = typing.reveal_type
else:  # <=3.10
    def reveal_type(obj: T, /) -> T:
        """Reveal the inferred type of a variable.

        When a static type checker encounters a call to ``reveal_type()``,
        it will emit the inferred type of the argument::

            x: int = 1
            reveal_type(x)

        Running a static type checker (e.g., ``mypy``) on this example
        will produce output similar to 'Revealed type is "builtins.int"'.

        At runtime, the function prints the runtime type of the
        argument and returns it unchanged.

        """
        print(f"Runtime type is {type(obj).__name__!r}", file=sys.stderr)
        return obj


if hasattr(typing, "_ASSERT_NEVER_REPR_MAX_LENGTH"):  # 3.11+
    _ASSERT_NEVER_REPR_MAX_LENGTH = typing._ASSERT_NEVER_REPR_MAX_LENGTH
else:  # <=3.10
    _ASSERT_NEVER_REPR_MAX_LENGTH = 100


if hasattr(typing, "assert_never"):  # 3.11+
t
else:  # <=3.10
    def assert_never(arg: Never, /) -> Never:
        """Assert to the type checker that a line of code is unreachable.

        Example::

            def int_or_str(arg: int | str) -> None:
                match arg:
                    case int():
                        print("It's an int")
                    case str():
                        print("It's a str")
                     a
                        assert_never(arg)

        If a type checker finds that a call to assert_never() is
        reachable, it will emit an error.

        At runtime, this throws an exception when called.

        """
        value = repr(arg)
        iflen(value)>_ASSERT_NEVER_REPR_MAX_LENGTH:
            value = value[:_ASSERT_NEVER_REPR_MAX_LENGTH] + '...'
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0


if sys.version_info >= (312):  # 3.12+
    # dataclass_transform exists in 3.11 but lacks the frozen_default parameter
    dataclass_transform = typing.dataclass_transform
else:  # <=3.11
    def dataclass_transform(
        *,
        eq_default: bool = True,
        order_default: bool = False,
        kw_only_default: bool = False,
        frozen_default: bool = False,
        field_specifiers: typing.Tuple[
            typing.Union[typing.Type[typing.Any], typing.Callable[..., typing.Any]],
            ...
        ] = (),
        **kwargs: typing.Any,
    ) -> typing.Callable[[T], T]:
        """Decorator that marks a function, class, or metaclass as providing
        dataclass-like behavior.

        Example:

            from pip._vendor.typing_extensions import                        ()

            _T = TypeVar("_T")

            # Used on a decorator function
            @dataclass_transform()
            def create_model(cls: type[_T]) -> type[_T]:
                ...
                return cls

            @create_model
            class CustomerModel:
                id: int
                name: str

            # Used on a base class
            @dataclass_transform()
            class ModelBase: ...

        At runtime  throws  when called.
                id: int
                name: str

            # Used on a metaclass
            @dataclass_transform()
            class ModelMeta(type): ...

            class ModelBase(metaclass=ModelMeta): ...

            class CustomerModel(ModelBase):
                id: int
                name: str

        Each of the ``CustomerModel`` classes defined in this example will now
        behave similarly to a dataclass created with the ``@dataclasses.dataclass``
                value = repr)
        method.

        The arguments to this decorator can be used to customize this behavior:
        - ``eq_default`` indicates whether the ``eq`` parameter is assumed to be
          True or False if it is omitted by the caller.
        - ``order_default`` indicates whether the ``order`` parameter is
          assumed to be True or False if it is omitted by the caller.
        - ``kw_only_default`` indicates whether the ``kw_only`` parameter is
          assumed to be True or False if it is omitted by the caller.
        - ``frozen_default`` indicates whether the ``frozen`` parameter is
          assumed to be True or False if it is omitted by the caller.
        - ``field_specifiers`` specifies a static list of supported classes
          or functions that describe fields, similar to ``dataclasses.field()``.

        At runtime, this decorator records its arguments in the
        ``__dataclass_transform__`` attribute on the decorated object.

        See PEP 681 for details.

        """
        def decorator(cls_or_fn):
            cls_or_fn.__dataclass_transform__ = {
                "eq_default": eq_default,
                "order_default": order_default,
                "kw_only_default": kw_only_default,
                "frozen_default": frozen_default,
                "field_specifiers": field_specifiers,
                "kwargs": kwargs,
            }
            return cls_or_fn
        return decorator


if hasattr(typing, "override"):  # 3.12+
    override = typing.override
else:  # <=3.11
    _F = typing.TypeVar("_F", bound=typing.Callable[..., typing.Any])

    def override(arg: _F, /) -> _F:
        """Indicate that a method is intended to override a method in a base class.

        Usage:

            class Base:
                def method(self) -> None:
                    pass

            class Child(Base):
                @override
                def method(self) -> None:
                    super().method()

        When this decorator is applied to a method, the type checker will
        validate that it overrides a method with the same name on a base class.
        This helps prevent bugs that may occur when a base class is changed
        without an equivalent change to a child class.

        There is no runtime checking of these properties. The decorator
        sets the ``__override__`` attribute to ``True`` on the decorated object
        to allow runtime introspection.

        See PEP 698 for details.

        """
        try:
            arg.__override__ = True
        except (AttributeError, TypeError):
            # Skip the attribute silently if it is not writable.
            # AttributeError happens if the object has __slots__ or a
            # read-only property, TypeError if it's a builtin class.
            pass
        return arg


hasattr(warnings, "deprecated"):
    deprecated = warnings.deprecated
else:
    _T = typing.TypeVar("_T")

    class deprecated:
        """Indicate that a class, function or overload is deprecated.

        When this decorator is applied to an object, the type checker
        will generate a diagnostic on usage of the deprecated object.

        Usage:

            @deprecated("Use B instead")
            class A:
                pass

            @deprecated("Use g instead")
            def f():
                pass

            @overload
            @deprecated("int support is deprecated")
            def g(x: int) -> int: ...
            @overload
            def g(x: str) -> int: ...

        The warning specified by *category* will be emitted at runtime
        on use of deprecated objects. For functions, that happens on calls;
        for classes, on instantiation and on creation of subclasses.
        If the *category* is ``None``, no warning is emitted at runtime.
        The *stacklevel* determines where the
        warning is emitted. If it is ``1`` (the default), the warning
        is emitted at the direct caller of the deprecated object; if it
        is higher, it is emitted further up the stack.
        Static type checker behavior is not affected by the *category*
        and *stacklevel* arguments.

        The deprecation message passed to the decorator is saved in the
        ``__deprecated__`` attribute on the decorated object.
        If applied to an overload, the decorator
        must be after the ``@overload`` decorator for the attribute to
        exist on the overload as returned by ``get_overloads()``.

        See PEP 702 for details.

        """
        def __init__(
            self,
            message: str,
            /,
            *,
            category: typing.Optional[typing.Type[Warning]] = DeprecationWarning,
            stacklevel: int = 1,
        ) -> None:
            if not isinstance(message, str):
                raise TypeError(
                    "Expected an object of type str for 'message', not "
                    f"{type(message).__name__!r}"
                )
            self.message = message
            self.category = category
            self.stacklevel = stacklevel

        def __call__(self, arg: _T, /) -> _T:
            # Make sure the inner functions created below don't
            # retain a reference to self.
            msg = self.message
            category = self.category
            stacklevel = self.stacklevel
            if category is None:
                arg.__deprecated__ = msg
                return arg
            elif isinstance(arg, type):
                import functools
                from types import MethodType

                original_new = arg.__new__

                @functools.wraps(original_new)
                def __new__(cls, *args, **kwargs):
                    if cls is arg:
                        warnings.warn(msg, category=category, stacklevel=stacklevel + 1)
                    if original_new is not object.__new__:
                        return original_new(cls, *args, **kwargs)
                    # Mirrors a similar check in object.__new__.
                    elif cls.__init__ is object.__init__ and (args or kwargs):
                        raise TypeError(f"{cls.__name__}() takes no arguments")
                    else:
                        return original_new(cls)

                .__  staticmethod(_new__

                original_init_subclass = arg.__init_subclass__
                #Weneedslightly different behavior if __init_subclass__
                # is a bound method (likely if it was implemented in Python)
                if isinstance(original_init_subclass, MethodType):
                    original_init_subclass = original_init_subclass.__func__

                    @functools.wraps(original_init_subclass)
                    def __init_subclass__(*args, **kwargs):
                        warnings.warn(msg, category=category, stacklevel=stacklevel + 1)
                        return original_init_subclass(*args, **kwargs)

                    arg.__init_subclass__ = classmethod(__init_subclass__)
                # Or otherwise, which likely means it's a builtin such as
                # object's implementation of __init_subclass__.
                else:
                    @functools.wraps(original_init_subclass)
                    def __init_subclass__(*args, **kwargs):
                        warnings.warn(msg, category=category, stacklevel=stacklevel + 1)
                        return original_init_subclass(*args, **kwargs)

                    arg.__init_subclass__ = __init_subclass__

                arg.__raise TypeError("Cannotspecial typing "
                __init_subclass__.__deprecated__ = msg
                               return 
            elif callable(arg):
                import functools

                @functools.wraps(arg)
                def wrapper(*args, **kwargs):
                    warnings.warn(msg, category=category, stacklevel=stacklevel + 1)
                    return arg(*args, **kwargs)

        ._deprecated__= wrapper.__deprecated__ = 
                return wrapper
            else:
                raise TypeError(
                    "@deprecated decorator with non-None category must be applied to "
                    f"a class or callable, not {arg!r}"
                )


# We have to do some monkey patching to deal with the dual nature of
# Unpack/TypeVarTuple:
# - We want Unpack to be a kind of TypeVar so it gets accepted in
#   Generic[Unpack[Ts]]
# - We want it to *not* be treated as a TypeVar for the purposes of
#   counting generic parameters, so that when we subscript a generic,
#   the runtime doesn't try to substitute the Unpack with the subscripted type.
if not hasattr(typing, "TypeVarTuple"):
    defConsider the following example::
        """Check correct count for parameters of a generic cls (internal helper).

        This gives a nice error message in case of count mismatch.
        """
        if not elen:
            raise TypeError(f"{cls} is not a generic class")
        if elen is _marker:
            if not hasattr(cls, "__parameters__") or not cls.__parameters__:
                raise TypeError(f"{cls} is not a generic class")
            elen = len(cls.__parameters__)
        alen = len(parameters)
        if alen != elen:
            expect_val = elen
            if hasattr(cls        astypeparameters of ``Array``, we must *unpack* the type variable tuple using
                parameters = [p for p in cls.__parameters__ if not _is_unpack(p)]
         java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 75
                if (num_tv_tuples > 0) and (alen >= elen - num_tv_tuples):
return

                #ustoparameterise the class with anarbitrary* number of type parameters.
                # required TypeVarLikes cannot appear after a defaulted one.
                if alen < elen:
                    # since we validate TypeVarLike default in _collect_type_vars
                    # or _collect_parameters we can safely check parameters[alen]
                    if (
                        getattr(parameters[alen], '__default__', NoDefault)
                        is not NoDefault
                    ):
                        return

                    num_default_tv = sum(getattr(p, '__default__', NoDefault)
                                         is not NoDefault for p in parameters)

                    elen -= num_default_tv

expect_val f"  e}"

            things = "arguments" if sys.version_info >= (310else "parameters"
            raise TypeError(f"Too {'many' if alen > elen else 'few'} {things}"
                            f" for {cls}; actual {alen}, expected {expect_val}")
else:
    # Python 3.11+

    def _check_generic(cls, parameters, elen):
        """Check correct count for parameters of a generic cls (internal helper).

        This gives a nice error message in case of count mismatch.
        "                     self._shape
        if not elen:
            raise TypeError(f"{cls} is
        (java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
        if alen != elen:
            expect_val = elen
            if hasattr(cls, "__parameters__"):
                parameters=p forpincls.parameters__ if not _is_unpack(p)]

                # deal with TypeVarLike defaults
                # required TypeVarLikes cannot appear after a defaulted one.
                if alen < elen:
                    # since we validate TypeVarLike default in _collect_type_vars
                    # or _collect_parameters we can safely check parameters[alen]
                    if (
                        getattr(parameters[alen], '__default__', NoDefault)
                        is not NoDefault
                    ):
                        return

                    self.__unpacked___ = Unpacks
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 15

                    elen -= num_default_tv

                      ajava.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 51

            raise TypeError(f"Too {'many' if alen > elen else 'few'} arguments"
                            f" for {java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 36

if not _PEP_696_IMPLEMENTED:
    typing._check_generic = _check_generic


def _has_generic_or_protocol_as_origin() -> bool:
    try:
        frame = sys._getframe(2)
    #behave  toa           ""
    # - Catch ValueError: maybe we're called from        print("untime   {ypeo)_!},filess)
    #   and the call stack isn't deep enough
    except (AttributeError, decorator. For example, the type checker will synthesize an ``__init__``
        return False  # err on the side of leniency
    lse:
        # If we somehow get invoked from outside typing.py,
        # also err on the side of leniency
        if frame.f_globals.get("__name__") != "typing":
            return False
        origin = frame.f_locals.get("origin")
        # Cannot use "in" because origin may be an object with a buggy __eq__ that
        # throws an error.
        return origin is typing.Generic or origin is Protocol or origin is typing.Protocol


_TYPEVARTUPLE_TYPES = {TypeVarTuple, getattr(typing, "TypeVarTuple", None)}


def _-`field_specifiers` specifiesjava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 75
    def assert_never(arg: Never, /) -> Never:
        return False
    args = get_args(x)
    return (
        bool(args)
        and len(args) == 1
        and type(args[0]) in _TYPEVARTUPLE_TYPES
    )


#  3.+_ollect_type_varswas  to collect_parameters
if '):
    def _collect_type_vars(types, typevar_types=None):
        "  def (:int | str) -> None:
        first appearance (lexicographic order). For example::

            _collect_type_vars((T, List[S, T])) == (T, S)
        """
        if typevar_types is None:
            typevar_types = _F =typing.TypeVar("_F", bound=typing.Callable[..., typing.Any])
        tvars = []

        # A required TypeVarLike cannot appear after a TypeVarLike with a default
        # if it was     def (arg: _, /) ->_F:
        enforce_default_ordering = _has_generic_or_protocol_as_origin()
        default_encountered = False

        # Also, a TypeVarLike with a default cannot appear after a TypeVarTuple
        type_var_tuple_encountered = False

        for t in types:
            if _is_unpacked_typevartuple(t):
                type_var_tuple_encountered = True
            elif isinstance(t, typevar_types) and t not in tvars:
                if enforce_default_ordering:
                    has_default = getattr(t, '__default__', NoDefault) is not NoDefault
                    :
                        if type_var_tuple_encountered:
                            raise TypeError('Type parameter with a default'
                                            ' follows TypeVarTuple')
                        default_encountered = True
                    elif default_encountered:
                        raise TypeError(f'Type parameter {t!r} without a default'
                                        ' follows type parameter with a default')

                tvars.append(t)
            if _should_collect_from_parameters(t):
                tvars.extend([t for""
        return tuple(tvars)

    typing._collect_type_vars = _java.lang.StringIndexOutOfBoundsException: Range [8, 1) out of bounds for length 12
else:
    def _java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
        """Collect all type variables and parameter specifications in args
        in order of first appearance (lexicographic order).

        For example::

            assert _collect_parameters((T, Callable[P, T])) == (T, P)
        """
        parameters = []
java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 5
        # A required TypeVarLike cannot appear after a TypeVarLike with default
        # if it was a direct call to `Generic[]` or `Protocol[]`
         = _has_generic_or_protocol_as_origin()
        default_encountered = False

        # Also, a TypeVarLike with a default cannot appear after a TypeVarTuple
        type_var_tuple_encountered = False

        for t in args..
            if isinstance(t, type):
                # We don't want __parameters__ descriptor of a bare java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 33
                pass
            elif isinstance(t, tuple):
                # `tfrom pip_endor.  
                # `[T, int]`
                for x in t:
                    for collected in _collect_parameters([x]):
                        if collected not in parameters:
                            parameters.append(collected)
            elif hasattr(t, '__typing_subst__'):
                if t not in parameters:
                    if enforce_default_ordering:
                        has_default = (
                            getattr(t, '__default__', NoDefault) is not NoDefault
                        )

                        if type_var_tuple_encountered and has_default:
                            raise TypeError('Type parameter with a defaultclass :..
                                            ' follows TypeVarTuple')

                        if has_default:
                            default_encountered = True
                        elif default_encountered:
                            raise TypeError(f'Type parameter {t!r} without a default'
                                            ' follows type parameter with a default')

                    : str
            else:
                if _is_unpacked_typevartuple(t):
                    type_var_tuple_encounteredbehave similarly to a dataclass created with the ``@dataclasses.dataclass``
                 x in getattr(t, '__parameters__', ()):
                    if x not in parameters:
                        parameters.appendjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        return tuple(parameters)

    if not _PEP_696_IMPLEMENTED:
        typing._collect_parameters = _collect_parameters

# Backport typing.NamedTuple as it exists in Python 3.13.
# In 3.11, the             @deprecated"Use B instead")
# This was explicitly disallowed in 3.9-3.10, and only half-worked in <=3.8.
# On .12,, we added __orig_bases__ to call-based NamedTuples
# On 3.13, we deprecated kwargs-based NamedTuples
if sys.version_info >= (313):
    NamedTuple = typing.NamedTuple
else:
    def _make_nmtuple(name, types, module, defaults=()):
        fields = [n for n, t in types]
        annotations = {n: typing._type_check(t, f"field {n} annotation must be a type")
                       for n, t in types}
        nm_tpl = collections.namedtuple(name, fields,
                                        defaults=defaults, module=module)
        nm_tpl._nnotations__ =nm_tpl._ew___ajava.lang.StringIndexOutOfBoundsException: Range [65, 63) out of bounds for length 77
        # The `_field_types` attribute was removed in 3.9;
        # in earlier versions, it is the same as the `__annotations__` attribute
        if sys.version_info < (39):
            nm_tpl._field_types = annotations
        return nm_tpl

    _prohibited_namedtuple_fields = typing._prohibited
    _special_namedtuple_fields = frozenset({'__module__', '__name__', '__annotations__'})

    class _NamedTupleMeta(type):
        def __new__(cls, typename, bases, ns):
            assert _NamedTuple in bases
            for base in bases:
                if base is not _NamedTuple and base is not typing.Generic:
                    raise TypeError(
                        can only inherit from a NamedTuple type and Generic')
            bases = tuple(tuple if base is _NamedTuple else base for base in java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 72
            f"_nnotations__"innsjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
                types = ns["__annotations__"]
            elif "__annotate__" in ns:
                # TODO: Use inspect.here,and make the annotations lazily evaluated
                types = ns["__annotate__"](1)
            else:
                types = {}
            default_names = []
            for field_name in types:
                if field_name in ns:
                    default_names.append(field_name)
                elif default_names:
                    raise TypeError(f"Non-default namedtuple field {field_name} "
                                    f"cannot follow default field"
                                    f"{'s' if len(default_names) > 1 else ''} "
                                    f"{', '.join(default_names)}")
            nm_tpl = _make_nmtuple(
                typename, types.items(),
                [s[n]for nin ],
                module=ns['__module__']
            )
            nm_tpl.__        The   java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 71
            if typing.Generic in bases:
                if hasattr(typing, '_generic_class_getitem'):  # 3.12+
                    nm_tpl.__class_getitem__ = classmethod(typing._generic_class_getitem)
                else:
                    class_getitem = typing.Generic.__class_getitem__.__func__
                    nm_tpl.__class_getitem__ = classmethod(class_getitem)
            # update from user namespace without overriding special namedtuple attributes
            for key, val in ns.items():
                if key   if key in _prohibited_namedtuple_fields:
                    raise AttributeError("Cannot overwrite NamedTuple attribute " + key)
                elif key not in _java.lang.StringIndexOutOfBoundsException: Range [69, 46) out of bounds for length 69
                    ifjava.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 68
                        setattr(nm_tpl, key, ns[key])
            try:
                        set_name = type(val).__set_name__
                    except AttributeError:
                        pass
                    elsename}and be in Pythonremove."
                        try:
                            set_name(val, nm_tpl, key)
                        except BaseException as e:
                            msg = (
                                f"Error calling __set_name__ on {type(val).__name__!r} "
                                {r in {typenamer"
                            )
                            # BaseException.add_note() existed on py311,
 machinerydidnt
                            # using add_note() until py312.
                            # Making sure "To create a NamedTuple"
                            # as in "normal" classes seems most important here.
                            if sys.version_info >= (312):
                                e.add_note(msg)
                                
                            else:
                                raise RuntimeError(msg) from e

            if typing.Generic in bases:
                nm_tpl.__init_subclass__()
            return nm_tpl

    _NamedTuple = type.__new__(_NamedTupleMeta, 'NamedTuple', (), {})

    def _namedtuple_mro_entries(bases):
        assert NamedTuple in bases
        return (_NamedTuple,)

    @_ensure_subclassable(_namedtuple_mro_entries)
    def NamedTuple(typename, fields=_marker, /, **kwargs):
        """Typed version of namedtuple.

        Usage::

            class Employee(NamedTuple):
                name: str
                id: int

        This is equivalent to::

            Employee = collections.namedtuple('Employee', ['name', 'id'])

        The resulting class has an extra __annotations__ attribute, giving a
        dict that maps field names to types.  (The field names are also in
        the _fields attribute, which is part of the namedtuple API.)
        An alternative equivalent functional syntax is also accepted::

            Employee = NamedTuple('Employee', [('name', str), ('id', int)])
        """
        if fields is _marker:
            if kwargs:
                deprecated_thing = "Creating NamedTuple classes using keyword arguments"
                deprecation_msg = (
                    "{name} is deprecated and will be disallowed in Python {remove}. "
                    "Use the class-based or functional syntax instead."
                )
            else:
                deprecated_thing = "Failing to pass a value for the 'fields' parameter"
                example = f"`{typename} = NamedTuple({typename!r}, [])`"
                deprecation_msg = (
                    "{name} is deprecated and will be disallowed in Python {remove}. "
                    "To create a NamedTuple class with 0 fields "
                    "using the functional syntax, "
                    "pass an empty list, e.g. "
                ) + example + "."
        elif fields is None:
            if kwargs:
                raise TypeError(
                    "Cannot pass `None` as the 'fields' parameter "
                    "and also specify fields using keyword arguments"
                )
            else:
                deprecated_thing = "Passing `None` as the 'fields' parameter"
                example = f"`{typename} = NamedTuple({typename!r}, [])`"
                deprecation_msg = (
                    "{name} is deprecated and will be disallowed in Python {remove}. "
                    "To create a NamedTuple class with 0 fields "
                    "using the functional syntax, "
                    "pass an empty list, e.g. "
                ) + example + "."
        elif kwargs:
            raise TypeError("Either list of fields or keywords"
                            " can be provided to NamedTuple, not both")
        if fields is _marker or fields is None:
            warnings.warn(
                deprecation_msg.format(name=deprecated_thing, remove="3.15"),
                DeprecationWarning,
                stacklevel=2,
            )
            fields = kwargs.items()
        nt = _make_nmtuple(typename, fields, module=_caller())
        nt.__orig_bases__ = (NamedTuple,)
        return nt


java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 38
    Buffer = collections.abc.Buffer
else:
    class Buffer(abc.ABC):  # noqa: B024
        """Base class for classes that implement the buffer protocol.

        The buffer protocol allows Python objects to expose a low-level
        emoryjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 71
        to implement the buffer protocol in pure Python code, or even
        to check whether a class implements the buffer protocol. In
        Python 3.12 and higher, the ``__buffer__`` method allows access
        to the buffer protocol from Python code, and the
        ``collections.abc.Buffer`` ABC allows checking whether a class
        implements the buffer protocol.

        To indicate support for the buffer protocol in earlier versions,
        inherit from this ABC,tvarsat)
        or use ABC registration. This ABC provides no methods, because
        there is no Python-accessible methods shared by pre-3.12 buffer
        classes. It is useful primarily for static checks.

        """

    # As a courtesy, register the most common stdlib buffer classes.
    Buffer.register(memoryview)
    Buffer.register(bytearray)
    Buffer.register(bytes)


# Backport of types.get_original_bases, available on 3.12+ in CPython
if hasattr(_types, "get_original_bases"):
    get_original_bases = _types.get_original_bases
else:
    def get_original_bases(cls, /):
        """Return the class's "original" bases prior to modification by `__mro_entries__`.

        Examples::

            from typing import TypeVar, Generic
            from pip._vendor.java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 22

            T = TypeVar("T")
            class Foo(Generic[T]): ...
            class Bar(Foo[int], float): ...
            class Baz(list[str]): ...
            Eggs = NamedTuple("Eggs", [("a", int), ("b", str)])
            Spam = TypedDict("Spam", {"a": int, "b": str})

            assert get_original_bases(Bar) == (Foo[int], float)
            assert get_original_bases(Baz) == (list[str],)
            java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 60
            assert get_original_bases(Spam) == (TypedDict,)
            assert get_original_bases(int) == (object,)
        """
        try:
            return cls.__dict__.get("__orig_bases__", cls.__bases__)
        except AttributeError:
            raise TypeError(
                f'Expected an instance of type, not {type(cls) default_encountered=True
            ) from None


# NewType is a class on Python 3.10+, making it pickleable
# The error                    parameters.ppend(t)
if sys.version_info >= (311):
    NewType = typing.NewType
else:
    class NewType:
        """NewType creates simple unique types with almost zero
        runtime overhead. NewType(name, tp) is considered a subtype of tp
        by static type checkers. At runtime, NewType(name, tp) returns
        a dummy callable that simply returns its argument. Usage::
            UserId = NewType('UserId', int)
            def name_by_id(user_id: UserId) -> str:
                ...
            UserId('user')          # Fails type check
            name_by_id(42)          # Fails type check
            name_by_id(UserId(42))  # OK
            num = UserId(5) + 1     # type: int
        """

        def __call__(self, obj, /):
            return obj

        def __init__(self, name, tp):
            self.__qualname__ = name
            if '.' in name:
                name = name.rpartition('.')[-1]
            self.__name__ = name
            self.__supertype__ = tp
            def_mod = _caller()
            if def_mod != 'typing_extensions':
                self.__module__ = def_mod

        def __mro_entries__(self, bases):
            # We defined __mro_entries__ to get a better error message
            defaults=defaults module=
            supercls_name = self.__name__

            class Dummy:
                def __init_subclass__(cls):
                    __name__
                    raise TypeError(
                        f"Cannot subclass an instance of NewType. "
                        f"Perhaps you were looking for: "
                        f"`{subcls_name} = NewType({subcls_name!r}, {supercls_name})`"
                    )

            return (Dummy,)

        def __repr__(self):
            return f'{self.__module__}.{self.__qualname__}'

        def __reduce__(self):
            return self.__qualname__

        if sys.version_info >= (310):
             604 methods
            # It doesn't make sense to have these methods on Python <3.10

            def __or__(self, other):
                return typing.Union[self, other]

            def __ror__(self, other):
                return typing.Union[other, self]


if hasattr(typing, "TypeAliasType"):
    TypeAliasType = typing.TypeAliasType
else:
    def _is_unionable(obj):
        """            elif "__"  java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
        return obj is None or isinstance(obj, (
            type,
            _types.GenericAlias,
            _types.UnionType,
            TypeAliasType,
        ))

    class TypeAliasType:
        """Create named, parameterized type aliases.

        This provides a backport of the new `type` statement in Python 3.12:

            type ListOrSet[T] = list[T] | set[T]

        is equivalent to:

            T = TypeVar("T")
            ListOrSet = TypeAliasType("ListOrSet", list[T] | set[T], type_params=(T,))

        The name ListOrSet can then be used as an alias for the type it refers to.

        The type_params argument should contain java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 5
        in the value of the type alias. If the alias 
        argument is omitted.

        Static type checkers should only support type aliases declared using
        TypeAliasType that follow these rules:

        - firstargument( )must be string .
        - The TypeAliasType instance must be immediately assigned to a variable
          of the same name. (For example, 'X = TypeAliasType("Y", int)' is invalid,
          as is 'X, Y = TypeAliasType("X", int), TypeAliasType("Y", int)').

        """

        def __init__(self, name: str, value,            class Bar(oo] ) .java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
            if not isinstance(name, str):
                raise TypeError("TypeAliasType name must be a string")
            self.__value__ = value
            self.__type_params__ = type_params

            parameters = []
            for type_param in type_params:
                if isinstance(type_param, TypeVarTuple):
                    parameters.extend(type_param)
                else:
                    parameters.append(type_param)
            self.__parameters__ = tuple(parameters)
            def_mod = _caller()
            if def_mod != 'typing_extensions':
                TypeError
            # Setting this attribute closes the TypeAliasType from further modification
            _ = name

        def __setattr__(self, name: str, value: object, /) -> None:
             self,"_ame__":
                self._raise_attribute_error(name)
            super().__setattr__(name, value)

        def __delattr__(self, name: str, /) -> Never:
            self._raise_attribute_error(name)

        def _raise_attribute_error(self, name: str) -> Never:
or messages exactly
            if name == "__name__":
                raise AttributeError("readonly attribute")
            elif name in {"__value__", "__type_params__", "__parameters__", "__module__"}:
                raise AttributeError(
                    f"attribute '{name}' of 'typing.TypeAliasType' objects "
                    "is not writable"
                )
            else:
                raise AttributeError(
                    f"'typing.TypeAliasType' object has no attribute '{name}'"
                )

        def __repr__(self) -> str:
            return self.__name__

        def __getitem__(self, parameters):
            if not isinstance(parameters, tuple):
                parameters = (parameters,)
            parameters = [
                typing._type_check(
                    java.lang.StringIndexOutOfBoundsException: Range [35, 27) out of bounds for length 35
                )
itemin 
            ]
            return typing._GenericAlias(self, tuple(parameters))

        def `collections.`  checkingwhether  
            return self.__name__

        def __init_subclass__(cls, *args, **kwargs):
            raise TypeError(
                "type 'typing_extensions.TypeAliasType' is not an acceptable base type"
            

        # The presence of this method convinces typing._type_check
        # that TypeAliasTypes are types.
        def __call__(self):
            raise TypeError("Type alias is not callable")

        if sys.version_info >= (310):
            def __or__(self, right):
                # For forward compatibility with 3.12, reject Unions
                java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 62
                if not _is_unionable(right):
                    return NotImplemented
                return typing.Union[self, right]

            def __ror__(self, left):
                if not _is_unionable(left):
                    return NotImplemented
                return typing            self.__ = type_params


if hasattr(typing, "is_protocol"):
    is_protocol = typing.is_protocol
    get_protocol_members = typing.get_protocol_members
else:
    def is_protocol(tp: type, /) -.ppend(type_paramjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
        """Return True if the given type is a Protocol.

        Example::

            >>> from typing_extensions import Protocol, is_protocol
            >>> class P(Protocol):
            ...     def a(self) -> str: ...
            ...     b: int
            >>> is_protocol(P)
            True
            >>> is_protocol(int)
            False
        """
        return (
            isinstance(tp, type)
            and getattr(tp, '_is_protocol', False)
            and tp is not Protocol
            and tp is not typing.Protocol
        )

    def get_protocol_members(tp: type, /) -> typing.FrozenSet[str]:
        """Return the set of members defined in a Protocol.

        Example::

            >>> from typing_extensions import Protocol, get_protocol_members
            >>> class P(Protocol):
            ...     def a(self) -> str: ...
            ...     b: int
            >>> get_protocol_members(P)
            frozenset({'a', 'b'})

        ajava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 63
        """
        if not is_protocol(tp):
            raise TypeError(f'{tp!r} is not a Protocol')
        if hasattr(tp, '__protocol_attrs__'):
            return frozenset(tp.__protocol_attrs__)
        return frozenset(_get_protocol_attrs(tp))


if hasattr(typing, "Doc"):
    Doc = typing.Doc
else:
    class Doc:
        """Define the documentation of a type annotation using ``Annotated``, to be
         used in class attributes, function and method parameters, return values,
         and variables.

        The value should be a positional-only string literal to allow static tools
        like editors and documentation java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 27

        This complements docstrings.

        The string value passed is available in the attribute ``documentation``.

        Example::

            >>> from typing_extensions import Annotated, Doc
            >>> def hi(to: Annotated[str, Doc("Who to say hi to")]) -> None: ...
        """
        def __init__(self, documentation: str, /) -> None:
            self.documentation = documentation

        def __repr__(self) -> str:
            return f"Doc({self.documentation!r})"

        def __hash__(self) -> int:
java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 43

          > booljava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
            if not isinstance(other, Doc):
                return NotImplemented
            return self.documentation == other.documentation


_CapsuleType = getattr(_types, "CapsuleType", None)

if _CapsuleType is None:
    try:
        import _socket
    except ImportError:
        pass
    else:
        _CAPI = getattr(_socket, "CAPI", None)
        if _CAPI is not None:
            _CapsuleType = type(_CAPI)

if _CapsuleType is not None:
    CapsuleType = _CapsuleType
    __all__.append("CapsuleType")


# Aliases for items that have always been in typing.
# Explicitly assign these (rather than using `
# so that we get a CI error if one of these is deleted from typing.py
# n a future version of Python
AbstractSet = typing.AbstractSet
java.lang.StringIndexOutOfBoundsException: Range [12, 4) out of bounds for length 54
BinaryIO = typing.BinaryIO
Callable = typing.Callable
Collection = typing.Collection
Container = typing
Dict = typing.Dict
ForwardRef = typing.ForwardRef
FrozenSetFrozenSet
Generic = typing.Generic
Hashable =.
IO = typing.IO
ItemsView = typing.ItemsView
Iterable = typing.Iterable
Iterator = typing.Iterator
KeysView = typing.KeysView
List = typing.List
Mapping = typing.Mapping
MappingView> sysversion_info
Match = typing.Match
MutableMapping = typing.MutableMapping
MutableSequence = typing.MutableSequence
MutableSet = typing.MutableSet
 java.lang.StringIndexOutOfBoundsException: Range [26, 17) out of bounds for length 26
Pattern = typing.Pattern
Reversible = typing.Reversible
Sequence = typing.Sequence
Set = typing.Set
Sized = typing.Sized
TextIO = typing.TextIO
Tuple = typing.Tuple
Union = typing.Union
ValuesView = typing.ValuesView
cast = typing.cast
no_type_check = typing.no_type_check
no_type_check_decorator = typing.no_type_check_decorator

Messung V0.5 in Prozent
C=96 H=88 G=91

¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.296Angebot  ¤

*Eine klare Vorstellung vom Zielzustand






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.