mirror of
https://github.com/python/cpython.git
synced 2025-07-23 03:05:38 +00:00
Whitespace normalization, via reindent.py.
This commit is contained in:
parent
e6ddc8b20b
commit
182b5aca27
453 changed files with 31318 additions and 31452 deletions
|
@ -6,21 +6,21 @@ _debug = 0
|
|||
_prune = ['(*)']
|
||||
|
||||
def find(pattern, dir = os.curdir):
|
||||
list = []
|
||||
names = os.listdir(dir)
|
||||
names.sort()
|
||||
for name in names:
|
||||
if name in (os.curdir, os.pardir):
|
||||
continue
|
||||
fullname = os.path.join(dir, name)
|
||||
if fnmatch.fnmatch(name, pattern):
|
||||
list.append(fullname)
|
||||
if os.path.isdir(fullname) and not os.path.islink(fullname):
|
||||
for p in _prune:
|
||||
if fnmatch.fnmatch(name, p):
|
||||
if _debug: print "skip", `fullname`
|
||||
break
|
||||
else:
|
||||
if _debug: print "descend into", `fullname`
|
||||
list = list + find(pattern, fullname)
|
||||
return list
|
||||
list = []
|
||||
names = os.listdir(dir)
|
||||
names.sort()
|
||||
for name in names:
|
||||
if name in (os.curdir, os.pardir):
|
||||
continue
|
||||
fullname = os.path.join(dir, name)
|
||||
if fnmatch.fnmatch(name, pattern):
|
||||
list.append(fullname)
|
||||
if os.path.isdir(fullname) and not os.path.islink(fullname):
|
||||
for p in _prune:
|
||||
if fnmatch.fnmatch(name, p):
|
||||
if _debug: print "skip", `fullname`
|
||||
break
|
||||
else:
|
||||
if _debug: print "descend into", `fullname`
|
||||
list = list + find(pattern, fullname)
|
||||
return list
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue