mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
PY-57541 PY-53896 Add missing AnyStr_co to partially updated Typeshed
Its absence made Py3TypeCheckerInspectionTest.testPathlibPathMatchingOsPathLike fail as os.PathLike protocol wasn't considered generic. Once the changes for generics are in the upstream, we will be able to update the Typeshed fully at long last. GitOrigin-RevId: 1333cc19bff15e328996c57362124a7fdb5ab057
This commit is contained in:
committed by
intellij-monorepo-bot
parent
c6cd29d193
commit
2135871356
@@ -23,6 +23,9 @@ _T_contra = TypeVar("_T_contra", contravariant=True)
|
||||
# def __enter__(self: Self) -> Self: ...
|
||||
Self = TypeVar("Self") # noqa Y001
|
||||
|
||||
# covariant version of typing.AnyStr, useful for protocols
|
||||
AnyStr_co = TypeVar("AnyStr_co", str, bytes, covariant=True) # noqa: Y001
|
||||
|
||||
# stable
|
||||
class IdentityFunction(Protocol):
|
||||
def __call__(self, __x: _T) -> _T: ...
|
||||
|
||||
Reference in New Issue
Block a user