mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 05:24:52 +08:00
Update genericpath to 3.12 (#10623)
This commit is contained in:
@@ -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: ...
|
||||
|
||||
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user