Use typing_extensions.Self instead of _typeshed.Self (#9702)

This commit is contained in:
Alex Waygood authored and GitHub committed 2023-02-15 11:32:43 +01:00
1 parent 8cd6d81f15
commit 7180d0223b
140 files changed
+597 -610

No files matched your search

+4 -4
View File
@@ -1,7 +1,7 @@
from _typeshed import Incomplete, ReadableBuffer, Self, SupportsRichComparison, SupportsTrunc
from _typeshed import Incomplete, ReadableBuffer, SupportsRichComparison, SupportsTrunc
from collections.abc import Callable, Generator
from typing import SupportsInt
from typing_extensions import SupportsIndex, TypeAlias
from typing_extensions import Self, SupportsIndex, TypeAlias
from pyasn1.type import base, constraint, namedtype, namedval
from pyasn1.type.tag import TagSet
@@ -34,7 +34,7 @@ class Integer(base.SimpleAsn1Type):
def __mod__(self, value): ...
def __rmod__(self, value): ...
# Accepts everything builtins.pow does
def __pow__(self: Self, value: complex, modulo: int | None = ...) -> Self: ...
def __pow__(self, value: complex, modulo: int | None = ...) -> Self: ...
def __rpow__(self, value): ...
def __floordiv__(self, value): ...
def __rfloordiv__(self, value): ...
@@ -190,7 +190,7 @@ class Real(base.SimpleAsn1Type):
def __mod__(self, value): ...
def __rmod__(self, value): ...
# Accepts everything builtins.pow with a float base does
def __pow__(self: Self, value: complex, modulo: int | None = ...) -> Self: ...
def __pow__(self, value: complex, modulo: int | None = ...) -> Self: ...
def __rpow__(self, value): ...
def __truediv__(self, value): ...
def __rtruediv__(self, value): ...