mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Enforce positional args for codec functions (#12343)
This commit is contained in:
@@ -7,12 +7,6 @@ _thread.interrupt_main
|
||||
_thread.lock
|
||||
_thread.start_joinable_thread
|
||||
_tkinter.create
|
||||
codecs.backslashreplace_errors
|
||||
codecs.ignore_errors
|
||||
codecs.namereplace_errors
|
||||
codecs.replace_errors
|
||||
codecs.strict_errors
|
||||
codecs.xmlcharrefreplace_errors
|
||||
ctypes._endian.DEFAULT_MODE
|
||||
ctypes._endian.RTLD_GLOBAL
|
||||
ctypes._endian.RTLD_LOCAL
|
||||
@@ -202,3 +196,11 @@ typing.SupportsAbs.__type_params__
|
||||
typing.SupportsRound.__type_params__
|
||||
typing_extensions.SupportsAbs.__type_params__
|
||||
typing_extensions.SupportsRound.__type_params__
|
||||
|
||||
# Runtime incorrectly has `self`
|
||||
codecs.backslashreplace_errors
|
||||
codecs.ignore_errors
|
||||
codecs.namereplace_errors
|
||||
codecs.replace_errors
|
||||
codecs.strict_errors
|
||||
codecs.xmlcharrefreplace_errors
|
||||
|
||||
@@ -146,12 +146,12 @@ BOM_UTF32: Literal[b"\xff\xfe\x00\x00", b"\x00\x00\xfe\xff"] # depends on `sys.
|
||||
BOM_UTF32_BE: Literal[b"\x00\x00\xfe\xff"]
|
||||
BOM_UTF32_LE: Literal[b"\xff\xfe\x00\x00"]
|
||||
|
||||
def strict_errors(exception: UnicodeError) -> tuple[str | bytes, int]: ...
|
||||
def replace_errors(exception: UnicodeError) -> tuple[str | bytes, int]: ...
|
||||
def ignore_errors(exception: UnicodeError) -> tuple[str | bytes, int]: ...
|
||||
def xmlcharrefreplace_errors(exception: UnicodeError) -> tuple[str | bytes, int]: ...
|
||||
def backslashreplace_errors(exception: UnicodeError) -> tuple[str | bytes, int]: ...
|
||||
def namereplace_errors(exception: UnicodeError) -> tuple[str | bytes, int]: ...
|
||||
def strict_errors(exception: UnicodeError, /) -> tuple[str | bytes, int]: ...
|
||||
def replace_errors(exception: UnicodeError, /) -> tuple[str | bytes, int]: ...
|
||||
def ignore_errors(exception: UnicodeError, /) -> tuple[str | bytes, int]: ...
|
||||
def xmlcharrefreplace_errors(exception: UnicodeError, /) -> tuple[str | bytes, int]: ...
|
||||
def backslashreplace_errors(exception: UnicodeError, /) -> tuple[str | bytes, int]: ...
|
||||
def namereplace_errors(exception: UnicodeError, /) -> tuple[str | bytes, int]: ...
|
||||
|
||||
class Codec:
|
||||
# These are sort of @abstractmethod but sort of not.
|
||||
|
||||
Reference in New Issue
Block a user