mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-25 02:57:14 +08:00
Use ConvertibleToInt/ConvertibleToFloat in many third-party stubs (#11022)
Note: this may make the latest version of certain stubs packages incompatible with older versions of mypy and pyright.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
from _typeshed import Incomplete, ReadableBuffer, SupportsRichComparison, SupportsTrunc
|
||||
from _typeshed import ConvertibleToInt, Incomplete, SupportsRichComparison
|
||||
from collections.abc import Callable, Generator
|
||||
from typing import SupportsInt
|
||||
from typing_extensions import Self, SupportsIndex, TypeAlias
|
||||
from typing_extensions import Self
|
||||
|
||||
from pyasn1.type import base, constraint, namedtype, namedval
|
||||
from pyasn1.type.tag import TagSet
|
||||
@@ -26,7 +25,6 @@ __all__ = [
|
||||
"NoValue",
|
||||
"noValue",
|
||||
]
|
||||
_SizedIntegerable: TypeAlias = ReadableBuffer | str | SupportsInt | SupportsIndex | SupportsTrunc
|
||||
|
||||
NoValue = base.NoValue
|
||||
noValue: NoValue
|
||||
@@ -129,11 +127,11 @@ class BitString(base.SimpleAsn1Type):
|
||||
def asInteger(self): ...
|
||||
def asBinary(self): ...
|
||||
@classmethod
|
||||
def fromHexString(cls, value, internalFormat: bool = False, prepend: _SizedIntegerable | None = None): ...
|
||||
def fromHexString(cls, value, internalFormat: bool = False, prepend: ConvertibleToInt | None = None): ...
|
||||
@classmethod
|
||||
def fromBinaryString(cls, value, internalFormat: bool = False, prepend: _SizedIntegerable | None = None): ...
|
||||
def fromBinaryString(cls, value, internalFormat: bool = False, prepend: ConvertibleToInt | None = None): ...
|
||||
@classmethod
|
||||
def fromOctetString(cls, value, internalFormat: bool = False, prepend: _SizedIntegerable | None = None, padding: int = 0): ...
|
||||
def fromOctetString(cls, value, internalFormat: bool = False, prepend: ConvertibleToInt | None = None, padding: int = 0): ...
|
||||
def prettyIn(self, value): ...
|
||||
|
||||
class OctetString(base.SimpleAsn1Type):
|
||||
|
||||
Reference in New Issue
Block a user