summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2015-07-25 16:03:49 +0200
committerFlorian Bruhin <me@the-compiler.org>2015-07-25 16:03:49 +0200
commitadf6bebd18e93599fb1188440876f97eb3ac6786 (patch)
tree63d6d32a4add0c57ac10cc7cf3e411571b333b12
parent54d3871cf554eae94bc48f1215cea5ebd8bce8ea (diff)
downloadastroid-git-adf6bebd18e93599fb1188440876f97eb3ac6786.tar.gz
get rid of logilab.common in modutils.
--HG-- branch : no-logilab-common
-rw-r--r--astroid/modutils.py14
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):