mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-15 08:17:07 +08:00
Make pkgutil.get_data return Optional[bytes] (#1714)
As per the docs (and implementation): - https://docs.python.org/3/library/pkgutil.html#pkgutil.get_data If the package cannot be located or loaded ... then None is returned.
This commit is contained in:
committed by
Jelle Zijlstra
parent
bc2f88d6ee
commit
8b367c770b
@@ -28,4 +28,4 @@ def iter_modules(path: Optional[List[str]] = ...,
|
||||
prefix: str = ...) -> _YMFNI: ... # TODO precise type
|
||||
def walk_packages(path: Optional[str] = ..., prefix: str = ...,
|
||||
onerror: Optional[Callable[[str], None]] = ...) -> _YMFNI: ...
|
||||
def get_data(package: str, resource: str) -> bytes: ...
|
||||
def get_data(package: str, resource: str) -> Optional[bytes]: ...
|
||||
|
||||
Reference in New Issue
Block a user