[Python-checkins] distutils2: pep8/pyflakes fixes for distutils2.util
tarek.ziade
python-checkins at python.org
Sun Mar 13 19:45:15 CET 2011
http://hg.python.org/distutils2/rev/34f512095698
changeset: 1105:34f512095698
user: Kelsey Hightower <kelsey.hightower at gmail.com>
date: Mon Feb 28 09:09:32 2011 -0500
summary:
pep8/pyflakes fixes for distutils2.util
files:
distutils2/util.py
diff --git a/distutils2/util.py b/distutils2/util.py
--- a/distutils2/util.py
+++ b/distutils2/util.py
@@ -15,7 +15,7 @@
try:
from glob import iglob as std_iglob
except ImportError:
- from glob import glob as std_iglob # for python < 2.5
+ from glob import glob as std_iglob # for python < 2.5
from ConfigParser import RawConfigParser
from inspect import getsource
@@ -953,6 +953,7 @@
_CHECK_RECURSIVE_GLOB = re.compile(r'[^/,{]\*\*|\*\*[^/,}]')
_CHECK_MISMATCH_SET = re.compile(r'^[^{]*\}|\{[^}]*$')
+
def iglob(path_glob):
"""Richer glob than the std glob module support ** and {opt1,opt2,opt3}"""
if _CHECK_RECURSIVE_GLOB.search(path_glob):
@@ -971,7 +972,7 @@
assert len(rich_path_glob) == 3, rich_path_glob
prefix, set, suffix = rich_path_glob
for item in set.split(','):
- for path in _iglob( ''.join((prefix, item, suffix))):
+ for path in _iglob(''.join((prefix, item, suffix))):
yield path
else:
if '**' not in path_glob:
@@ -988,7 +989,7 @@
for (path, dir, files) in os.walk(prefix):
path = os.path.normpath(path)
for file in _iglob(os.path.join(path, radical)):
- yield file
+ yield file
def cfg_to_args(path='setup.cfg'):
--
Repository URL: http://hg.python.org/distutils2
More information about the Python-checkins
mailing list