8000 Update os.path.isdir on Windows Python3.12+ · python/typeshed@06d0e14 · GitHub
[go: up one dir, main page]

Skip to content

Commit 06d0e14

Browse files
committed
Update os.path.isdir on Windows Python3.12+
1 parent 96eaa76 commit 06d0e14

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

stdlib/ntpath.pyi

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
import sys
2-
from _typeshed import BytesPath, StrPath
2+
from _typeshed import BytesPath, FileDescriptorOrPath, StrPath
33
from genericpath import (
44
commonprefix as commonprefix,
55
exists as exists,
66
getatime as getatime,
77
getctime as getctime,
88
getmtime as getmtime,
99
getsize as getsize,
10-
isdir as isdir,
1110
isfile as isfile,
1211
samefile as samefile,
1312
sameopenfile as sameopenfile,
@@ -45,6 +44,11 @@ from posixpath import (
4544

4645
if sys.version_info >= (3, 12):
4746
from posixpath import isjunction as isjunction, splitroot as splitroot
47+
def isdir(path: FileDescriptorOrPath) -> bool: ...
48+
49+
else:
50+
def isdir(s: FileDescriptorOrPath) -> bool: ...
51+
4852
from typing import AnyStr, overload
4953
from typing_extensions import LiteralString
5054

tests/stubtest_allowlists/win32-py312.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,3 @@ asyncio.IocpProactor.recvfrom_into
44
asyncio.windows_events.IocpProactor.finish_socket_func
55
asyncio.windows_events.IocpProactor.recvfrom_into
66
msvcrt.GetErrorMode
7-
ntpath.isdir
8-
os.path.isdir

0 commit comments

Comments
 (0)
0