mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
Change the way ignore is assigned to
This commit is contained in:
parent
9d741a79c0
commit
ceb86daa16
1 changed files with 3 additions and 3 deletions
|
@ -46,10 +46,10 @@ badprefixes = ['.', ',', '@', '#', 'o.']
|
||||||
badsuffixes = \
|
badsuffixes = \
|
||||||
['~', '.a', '.o', '.old', '.bak', '.orig', '.new', '.prev', '.not', \
|
['~', '.a', '.o', '.old', '.bak', '.orig', '.new', '.prev', '.not', \
|
||||||
'.pyc', '.elc']
|
'.pyc', '.elc']
|
||||||
|
ignore = []
|
||||||
|
|
||||||
def setup():
|
def setup():
|
||||||
global ignore
|
ignore[:] = badnames
|
||||||
ignore = badnames[:]
|
|
||||||
for p in badprefixes:
|
for p in badprefixes:
|
||||||
ignore.append(p + '*')
|
ignore.append(p + '*')
|
||||||
for p in badsuffixes:
|
for p in badsuffixes:
|
||||||
|
@ -58,7 +58,7 @@ def setup():
|
||||||
f = open('.xxcign', 'r')
|
f = open('.xxcign', 'r')
|
||||||
except IOError:
|
except IOError:
|
||||||
return
|
return
|
||||||
ignore = ignore + string.split(f.read())
|
ignore[:] = ignore + string.split(f.read())
|
||||||
|
|
||||||
def skipfile(file):
|
def skipfile(file):
|
||||||
for p in ignore:
|
for p in ignore:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue