Add back module-level __getattr__ to encodings (#5261)

This is needed for submodules, such as `encodings.cp437`.
This commit is contained in:
Jukka Lehtosalo authored and GitHub committed 2021-04-28 07:45:15 -07:00
1 parent 2c8cb60596
commit 8bd3e16eef
2 files changed
+6 -2

No files matched your search

+4 -1
View File
@@ -1,7 +1,10 @@
from codecs import CodecInfo
from typing import Optional, Union
from typing import Any, Optional, Union
class CodecRegistryError(LookupError, SystemError): ...
def normalize_encoding(encoding: Union[str, bytes]) -> str: ...
def search_function(encoding: str) -> Optional[CodecInfo]: ...
# Needed for submodules
def __getattr__(name: str) -> Any: ... # incomplete