Skip to content

Remove a few unused TypedDicts #8522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions stubs/chardet/chardet/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,14 @@ if sys.version_info >= (3, 8):
else:
from typing_extensions import TypedDict

class _LangModelType(TypedDict):
# unused in this module, but imported in multiple submodules
class _LangModelType(TypedDict): # noqa: Y049
char_to_order_map: tuple[int, ...]
precedence_matrix: tuple[int, ...]
typical_positive_ratio: float
keep_english_letter: bool
charset_name: str
language: str

class _SMModelType(TypedDict):
class_table: tuple[int, ...]
class_factor: int
state_table: tuple[int, ...]
char_len_table: tuple[int, ...]
name: str

def detect(byte_str: bytes | bytearray) -> _FinalResultType: ...
def detect_all(byte_str: bytes | bytearray, ignore_threshold: bool = ...) -> list[_IntermediateResultType]: ...
4 changes: 0 additions & 4 deletions stubs/emoji/emoji/core.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@ from typing_extensions import Literal, TypedDict

_DEFAULT_DELIMITER: str

class _EmojiLisReturn(TypedDict):
emoji: str
location: int

class _EmojiListReturn(TypedDict):
emoji: str
match_start: int
Expand Down
6 changes: 0 additions & 6 deletions stubs/redis/redis/asyncio/connection.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@ NO_SUCH_MODULE_ERROR: str
MODULE_UNLOAD_NOT_POSSIBLE_ERROR: str
MODULE_EXPORTS_DATA_TYPES_ERROR: str

class _HiredisReaderArgs(TypedDict):
protocolError: Callable[[str], Exception]
replyError: Callable[[str], Exception]
encoding: str | None
errors: str | None

Comment on lines -32 to -37
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one exists at runtime, but I don't think we need it in the stub.

class Encoder:
encoding: Any
encoding_errors: Any
Expand Down