mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Add back module-level __getattr__ to encodings (#5261)
This is needed for submodules, such as `encodings.cp437`.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user