aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Lib/genericpath.py
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:30 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:30 +0300
commit2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch)
tree012bb94d777798f1f56ac1cec429509766d05181 /contrib/tools/python3/src/Lib/genericpath.py
parent6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff)
downloadydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/tools/python3/src/Lib/genericpath.py')
-rw-r--r--contrib/tools/python3/src/Lib/genericpath.py20
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 ce36451a3a..220a3fc292 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