Update genericpath to 3.12 (#10623)

This commit is contained in:
Nikita Sobolev
2023-08-28 12:19:09 +03:00
committed by GitHub
parent 2c1db00761
commit 03e65e1f1a
2 changed files with 7 additions and 3 deletions

View File

@@ -1,5 +1,6 @@
import os
from _typeshed import BytesPath, FileDescriptorOrPath, StrPath, SupportsRichComparisonT
import sys
from _typeshed import BytesPath, FileDescriptorOrPath, StrOrBytesPath, StrPath, SupportsRichComparisonT
from collections.abc import Sequence
from typing import overload
from typing_extensions import Literal, LiteralString
@@ -17,6 +18,8 @@ __all__ = [
"sameopenfile",
"samestat",
]
if sys.version_info >= (3, 12):
__all__ += ["islink"]
# All overloads can return empty string. Ideally, Literal[""] would be a valid
# Iterable[T], so that list[T] | Literal[""] could be used as a return
@@ -36,6 +39,9 @@ def getsize(filename: FileDescriptorOrPath) -> int: ...
def isfile(path: FileDescriptorOrPath) -> bool: ...
def isdir(s: FileDescriptorOrPath) -> bool: ...
if sys.version_info >= (3, 12):
def islink(path: StrOrBytesPath) -> bool: ...
# These return float if os.stat_float_times() == True,
# but int is a subclass of float.
def getatime(filename: FileDescriptorOrPath) -> float: ...

View File

@@ -12,8 +12,6 @@ enum.Enum.__signature__
enum.EnumMeta.__call__
enum.EnumType.__call__
enum.property.member
genericpath.__all__
genericpath.islink
gzip.GzipFile.filename
http.client.HTTPConnection.get_proxy_response_headers
imaplib.IMAP4_SSL.__init__