mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
os.DirEntry.stat() accepts a follow_symlinks keyword argument (#2538)
This function accepts the same arguments as the is_file() and is_dir() methods in this class. This also marks the follow_symlinks arguments to `is_dir()` and `is_file()` as keyword only.
This commit is contained in:
committed by
Sebastian Rittau
parent
c4f4c40601
commit
79b2df4b24
@@ -210,10 +210,10 @@ if sys.version_info >= (3, 6):
|
||||
name: AnyStr
|
||||
path: AnyStr
|
||||
def inode(self) -> int: ...
|
||||
def is_dir(self, follow_symlinks: bool = ...) -> bool: ...
|
||||
def is_file(self, follow_symlinks: bool = ...) -> bool: ...
|
||||
def is_dir(self, *, follow_symlinks: bool = ...) -> bool: ...
|
||||
def is_file(self, *, follow_symlinks: bool = ...) -> bool: ...
|
||||
def is_symlink(self) -> bool: ...
|
||||
def stat(self) -> stat_result: ...
|
||||
def stat(self, *, follow_symlinks: bool = ...) -> stat_result: ...
|
||||
|
||||
def __fspath__(self) -> AnyStr: ...
|
||||
elif sys.version_info >= (3, 5):
|
||||
@@ -224,10 +224,10 @@ elif sys.version_info >= (3, 5):
|
||||
name: AnyStr
|
||||
path: AnyStr
|
||||
def inode(self) -> int: ...
|
||||
def is_dir(self, follow_symlinks: bool = ...) -> bool: ...
|
||||
def is_file(self, follow_symlinks: bool = ...) -> bool: ...
|
||||
def is_dir(self, *, follow_symlinks: bool = ...) -> bool: ...
|
||||
def is_file(self, *, follow_symlinks: bool = ...) -> bool: ...
|
||||
def is_symlink(self) -> bool: ...
|
||||
def stat(self) -> stat_result: ...
|
||||
def stat(self, *, follow_symlinks: bool = ...) -> stat_result: ...
|
||||
|
||||
|
||||
if sys.platform != 'win32':
|
||||
|
||||
Reference in New Issue
Block a user