Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
_typing_compat.pyi16 linesDownload Raw Back to attr
1from typing import Any, ClassVar, Protocol2 3# MYPY is a special constant in mypy which works the same way as `TYPE_CHECKING`.4MYPY = False5 6if MYPY:7    # A protocol to be able to statically accept an attrs class.8    class AttrsInstance_(Protocol):9        __attrs_attrs__: ClassVar[Any]10 11else:12    # For type checkers without plug-in support use an empty protocol that13    # will (hopefully) be combined into a union.14    class AttrsInstance_(Protocol):15        pass16 
codekingpro/portable-devtools · Team Ai