diff options
author | Florian Bruhin <me@the-compiler.org> | 2015-07-25 16:03:49 +0200 |
---|---|---|
committer | Florian Bruhin <me@the-compiler.org> | 2015-07-25 16:03:49 +0200 |
commit | adf6bebd18e93599fb1188440876f97eb3ac6786 (patch) | |
tree | 63d6d32a4add0c57ac10cc7cf3e411571b333b12 /astroid/modutils.py | |
parent | 54d3871cf554eae94bc48f1215cea5ebd8bce8ea (diff) | |
download | astroid-git-adf6bebd18e93599fb1188440876f97eb3ac6786.tar.gz |
get rid of logilab.common in modutils.
--HG--
branch : no-logilab-common
Diffstat (limited to 'astroid/modutils.py')
-rw-r--r-- | astroid/modutils.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/astroid/modutils.py b/astroid/modutils.py index 5a6c3471..8c57d9d5 100644 --- a/astroid/modutils.py +++ b/astroid/modutils.py @@ -43,8 +43,6 @@ try: except ImportError: pkg_resources = None -from logilab.common import _handle_blacklist - PY_ZIPMODULE = object() if sys.platform.startswith('win'): @@ -111,6 +109,18 @@ def _path_from_filename(filename, is_jython=IS_JYTHON): return filename +def _handle_blacklist(blacklist, dirnames, filenames): + """remove files/directories in the black list + + dirnames/filenames are usually from os.walk + """ + for norecurs in blacklist: + if norecurs in dirnames: + dirnames.remove(norecurs) + elif norecurs in filenames: + filenames.remove(norecurs) + + _NORM_PATH_CACHE = {} def _cache_normalize_path(path): |