var/opt/nydus/ops/attr/__pycache__/_compat.cpython-38.pyc000064400000005032147205565740017354 0ustar00U af @sHddlZddlZddlZddlZddlmZmZddlmZe dkZ ej dddkZ ej dddkZ ej dddkZej ddd kZej ddd kZej ddd kZej ddd kZej dkrzdd lmZWnek reZYnXn dd lmZerddlZejZnddZGdddZeZddZdS)N)MappingSequence) _GenericAliasPyPy))r )r )r )r )r )r)ProtocolcCs|jdiS)z, Get annotations for *cls*. __annotations__)__dict__get)clsr=/opt/nydus/tmp/pip-target-53d1vnqk/lib/python/attr/_compat.py_get_annotations%src@s.eZdZdZdgZddZddZddZd S) _AnnotationExtractorz^ Extract type annotations from a callable, returning None whenever there is none. sigc Cs4zt||_Wnttfk r.d|_YnXdS)N)inspect signaturer ValueError TypeError)selfcallablerrr__init__4sz_AnnotationExtractor.__init__cCs>|js dSt|jj}|r:|djtjjk r:|djSdS)zU Return the type annotation of the first argument if it's not empty. Nr)rlist parametersvalues annotationr Parameterempty)rparamsrrrget_first_param_type:s  z)_AnnotationExtractor.get_first_param_typecCs"|jr|jjtjjk r|jjSdS)z; Return the return type if it's not empty. N)rreturn_annotationr Signaturer%)rrrrget_return_typeGs z$_AnnotationExtractor.get_return_typeN)__name__ __module__ __qualname____doc__ __slots__rr'r*rrrrr,s  rcCs|jtkr|jSdS)zDIf this is a generic class (A[str]), return the generic base for it.N) __class__r __origin__)Zclrrrget_generic_basecs r2)rplatformsys threadingcollections.abcrrtypingrpython_implementationZPYPY version_infoZ PY_3_8_PLUSZ PY_3_9_PLUSZ PY_3_10_PLUSZ PY_3_11_PLUSZ PY_3_12_PLUSZ PY_3_13_PLUSZ PY_3_14_PLUSZtyping_extensionsr ImportErrorobjectZ annotationlibZget_annotationsrrlocalZ repr_contextr2rrrrs4     4