diff options
| author | shadchin <[email protected]> | 2022-02-10 16:44:39 +0300 |
|---|---|---|
| committer | Daniil Cherednik <[email protected]> | 2022-02-10 16:44:39 +0300 |
| commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
| tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/tools/python3/src/Lib/genericpath.py | |
| parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
Restoring authorship annotation for <[email protected]>. Commit 2 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Lib/genericpath.py')
| -rw-r--r-- | contrib/tools/python3/src/Lib/genericpath.py | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/contrib/tools/python3/src/Lib/genericpath.py b/contrib/tools/python3/src/Lib/genericpath.py index 220a3fc292a..ce36451a3af 100644 --- a/contrib/tools/python3/src/Lib/genericpath.py +++ b/contrib/tools/python3/src/Lib/genericpath.py @@ -17,7 +17,7 @@ def exists(path): """Test whether a path exists. Returns False for broken symbolic links""" try: os.stat(path) - except (OSError, ValueError): + except (OSError, ValueError): return False return True @@ -28,7 +28,7 @@ def isfile(path): """Test whether a path is a regular file""" try: st = os.stat(path) - except (OSError, ValueError): + except (OSError, ValueError): return False return stat.S_ISREG(st.st_mode) @@ -40,7 +40,7 @@ def isdir(s): """Return true if the pathname refers to an existing directory.""" try: st = os.stat(s) - except (OSError, ValueError): + except (OSError, ValueError): return False return stat.S_ISDIR(st.st_mode) @@ -92,11 +92,11 @@ def samestat(s1, s2): # Are two filenames really pointing to the same file? def samefile(f1, f2): - """Test whether two pathnames reference the same actual file or directory - - This is determined by the device number and i-node number and - raises an exception if an os.stat() call on either pathname fails. - """ + """Test whether two pathnames reference the same actual file or directory + + This is determined by the device number and i-node number and + raises an exception if an os.stat() call on either pathname fails. + """ s1 = os.stat(f1) s2 = os.stat(f2) return samestat(s1, s2) @@ -149,7 +149,7 @@ def _check_arg_types(funcname, *args): elif isinstance(s, bytes): hasbytes = True else: - raise TypeError(f'{funcname}() argument must be str, bytes, or ' - f'os.PathLike object, not {s.__class__.__name__!r}') from None + raise TypeError(f'{funcname}() argument must be str, bytes, or ' + f'os.PathLike object, not {s.__class__.__name__!r}') from None if hasstr and hasbytes: raise TypeError("Can't mix strings and bytes in path components") from None |
