mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-10-16 02:51:28 +08:00
Fix several new-in-3.11 stubtest errors (#7973)
This commit is contained in:
1 parent
cb9023988d
commit
acc0167dc1
12 files changed
+195
-85
No files matched your search
@@ -40,7 +40,11 @@ else:
|
||||
__all__ = ["Package", "Resource", "contents", "is_resource", "open_binary", "open_text", "path", "read_binary", "read_text"]
|
||||
|
||||
Package: TypeAlias = str | ModuleType
|
||||
Resource: TypeAlias = str | os.PathLike[Any]
|
||||
|
||||
if sys.version_info >= (3, 11):
|
||||
Resource: TypeAlias = str
|
||||
else:
|
||||
Resource: TypeAlias = str | os.PathLike[Any]
|
||||
|
||||
def open_binary(package: Package, resource: Resource) -> BinaryIO: ...
|
||||
def open_text(package: Package, resource: Resource, encoding: str = ..., errors: str = ...) -> TextIO: ...
|
||||
|
||||
Reference in new issue
Block a user