/
niceSOFT
/
python3-attrs
Обзор
Документация
Войти
/
niceSOFT
/
python3-attrs
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
src/attr/_typing_compat.pyi
15 строк
469 B
layday
Fix type errors in Pyright (#999)
30 авг 2022, 16:06
Не верифицирован
30 авг 2022, 16:06
f7fa5a8
Код
Авторство
О чём код?
from typing import Any, ClassVar, Protocol # MYPY is a special constant in mypy which works the same way as `TYPE_CHECKING`. MYPY = False if MYPY: # A protocol to be able to statically accept an attrs class. class AttrsInstance_(Protocol): __attrs_attrs__: ClassVar[Any] else: # For type checkers without plug-in support use an empty protocol that # will (hopefully) be combined into a union. class AttrsInstance_(Protocol): pass