Upload hf_env/lib/python3.14/site-packages/attr/_typing_compat.pyi with huggingface_hub
Browse files
hf_env/lib/python3.14/site-packages/attr/_typing_compat.pyi
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from typing import Any, ClassVar, Protocol
|
| 2 |
+
|
| 3 |
+
# MYPY is a special constant in mypy which works the same way as `TYPE_CHECKING`.
|
| 4 |
+
MYPY = False
|
| 5 |
+
|
| 6 |
+
if MYPY:
|
| 7 |
+
# A protocol to be able to statically accept an attrs class.
|
| 8 |
+
class AttrsInstance_(Protocol):
|
| 9 |
+
__attrs_attrs__: ClassVar[Any]
|
| 10 |
+
|
| 11 |
+
else:
|
| 12 |
+
# For type checkers without plug-in support use an empty protocol that
|
| 13 |
+
# will (hopefully) be combined into a union.
|
| 14 |
+
class AttrsInstance_(Protocol):
|
| 15 |
+
pass
|