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:
Adam Simpkins
2018-10-23 14:13:33 -07:00
committed by Sebastian Rittau
parent c4f4c40601
commit 79b2df4b24

View File

@@ -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':