From 79b2df4b243d4e8f059f67c8e88fdd1c33513c3e Mon Sep 17 00:00:00 2001 From: Adam Simpkins Date: Tue, 23 Oct 2018 14:13:33 -0700 Subject: [PATCH] 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. --- stdlib/3/os/__init__.pyi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stdlib/3/os/__init__.pyi b/stdlib/3/os/__init__.pyi index 612ce7c4a..de5a34a63 100644 --- a/stdlib/3/os/__init__.pyi +++ b/stdlib/3/os/__init__.pyi @@ -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':