mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-06-23 17:28:38 +08:00
[reportlab] Use TypeIs for utils (#15451)
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
import datetime
|
||||
import zipimport
|
||||
from _typeshed import Incomplete, SupportsItems
|
||||
from builtins import _ClassInfo
|
||||
from collections.abc import Generator, Iterable, MutableMapping
|
||||
from os import PathLike
|
||||
from time import _TimeTuple, struct_time
|
||||
from types import TracebackType
|
||||
from typing import AnyStr, Final, Literal, TypeVar, overload, type_check_only
|
||||
from typing_extensions import TypeIs
|
||||
from urllib.request import _UrlopenRet
|
||||
|
||||
from reportlab.lib.rltempfile import get_rl_tempdir as get_rl_tempdir, get_rl_tempfile as get_rl_tempfile
|
||||
@@ -31,10 +33,10 @@ __UNSET__: Final[_UNSET_]
|
||||
isPyPy: bool
|
||||
|
||||
def isFunction(v: object) -> bool: ...
|
||||
def isMethod(v: object, mt=...) -> bool: ...
|
||||
def isMethod(v: object, mt: type = ...) -> bool: ...
|
||||
def isModule(v: object) -> bool: ...
|
||||
def isSeq(v: object, _st=...) -> bool: ...
|
||||
def isNative(v: object) -> bool: ...
|
||||
def isSeq(v: object, _st: _ClassInfo = ...) -> bool: ...
|
||||
def isNative(v: object) -> TypeIs[str]: ...
|
||||
|
||||
strTypes: tuple[type[str], type[bytes]]
|
||||
|
||||
@@ -43,10 +45,10 @@ def asUnicode(v: str | bytes, enc: str = "utf8") -> str: ...
|
||||
def asUnicodeEx(v: str | bytes, enc: str = "utf8") -> str: ...
|
||||
def asNative(v: str | bytes, enc: str = "utf8") -> str: ...
|
||||
def int2Byte(i: int) -> bytes: ...
|
||||
def isStr(v: object) -> bool: ...
|
||||
def isBytes(v: object) -> bool: ...
|
||||
def isUnicode(v: object) -> bool: ...
|
||||
def isClass(v: object) -> bool: ...
|
||||
def isStr(v: object) -> TypeIs[str | bytes]: ...
|
||||
def isBytes(v: object) -> TypeIs[bytes]: ...
|
||||
def isUnicode(v: object) -> TypeIs[str]: ...
|
||||
def isClass(v: object) -> TypeIs[type]: ...
|
||||
def isNonPrimitiveInstance(x: object) -> bool: ...
|
||||
def instantiated(v: object) -> bool: ...
|
||||
def bytestr(x: object, enc: str = "utf8") -> bytes: ...
|
||||
|
||||
Reference in New Issue
Block a user