aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/src/Lib/glob.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/glob.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/glob.py')
-rw-r--r--contrib/tools/python3/src/Lib/glob.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/contrib/tools/python3/src/Lib/glob.py b/contrib/tools/python3/src/Lib/glob.py
index 1237061130..535cbcb420 100644
--- a/contrib/tools/python3/src/Lib/glob.py
+++ b/contrib/tools/python3/src/Lib/glob.py
@@ -1,10 +1,10 @@
"""Filename globbing utility."""
-import contextlib
+import contextlib
import os
import re
import fnmatch
-import sys
+import sys
__all__ = ["glob", "iglob", "escape"]
@@ -32,7 +32,7 @@ def iglob(pathname, *, recursive=False):
If recursive is true, the pattern '**' will match any files and
zero or more directories and subdirectories.
"""
- sys.audit("glob.glob", pathname, recursive)
+ sys.audit("glob.glob", pathname, recursive)
it = _iglob(pathname, recursive, False)
if recursive and _isrecursive(pathname):
s = next(it) # skip empty string
@@ -80,7 +80,7 @@ def _iglob(pathname, recursive, dironly):
# takes a literal basename (so it only has to check for its existence).
def _glob1(dirname, pattern, dironly):
- names = _listdir(dirname, dironly)
+ names = _listdir(dirname, dironly)
if not _ishidden(pattern):
names = (x for x in names if not _ishidden(x))
return fnmatch.filter(names, pattern)
@@ -131,13 +131,13 @@ def _iterdir(dirname, dironly):
except OSError:
return
-def _listdir(dirname, dironly):
- with contextlib.closing(_iterdir(dirname, dironly)) as it:
- return list(it)
-
+def _listdir(dirname, dironly):
+ with contextlib.closing(_iterdir(dirname, dironly)) as it:
+ return list(it)
+
# Recursively yields relative pathnames inside a literal directory.
def _rlistdir(dirname, dironly):
- names = _listdir(dirname, dironly)
+ names = _listdir(dirname, dironly)
for x in names:
if not _ishidden(x):
yield x