From 89440987805b583e9e1d42991e1140a7a4f63bc2 Mon Sep 17 00:00:00 2001 From: Barney Gale Date: Mon, 28 Aug 2023 14:55:59 +0100 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- Lib/pathlib.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/Lib/pathlib.py b/Lib/pathlib.py index 75c86c9b7b1600..5dd88634462077 100644 --- a/Lib/pathlib.py +++ b/Lib/pathlib.py @@ -790,7 +790,7 @@ class _PathBase(PurePath): """ __slots__ = () __bytes__ = None - __fspath__ = None + __fspath__ = None # virtual paths have no local file system representation def stat(self, *, follow_symlinks=True): """ @@ -1190,8 +1190,8 @@ def walk(self, top_down=True, on_error=None, follow_symlinks=False): paths += [path._make_child_relpath(d) for d in reversed(dirnames)] def absolute(self): - """Return an absolute version of this path by prepending the current - working directory. No normalization or symlink resolution is performed. + """Return an absolute version of this path + No normalization or symlink resolution is performed. Use resolve() to get the canonical path to a file. """ @@ -1210,8 +1210,7 @@ def expanduser(self): @classmethod def home(cls): - """Return a new path pointing to the user's home directory (as - returned by os.path.expanduser('~')). + """Return a new path pointing to expanduser('~'). """ return cls("~").expanduser()