diff options
author | Sylvain Th?nault <thenault@gmail.com> | 2014-04-11 09:19:50 +0200 |
---|---|---|
committer | Sylvain Th?nault <thenault@gmail.com> | 2014-04-11 09:19:50 +0200 |
commit | e50c407772a1c5d6403674eecef548f7cb33f9d7 (patch) | |
tree | 2786eabd396628c027c2c99879015e9cd2044618 /checkers | |
parent | 44882502cc56c439da4a150996c39f3ddaf809b2 (diff) | |
parent | 67d3b24ed30ca18aac0842c46166c4c88dd4ea84 (diff) | |
download | pylint-e50c407772a1c5d6403674eecef548f7cb33f9d7.tar.gz |
Merged in bukzor/pylint/w0401_package (pull request #66)
Improve cyclic import detection in the case of packages.
Diffstat (limited to 'checkers')
-rw-r--r-- | checkers/imports.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/checkers/imports.py b/checkers/imports.py index 5be2b54..fd897a8 100644 --- a/checkers/imports.py +++ b/checkers/imports.py @@ -16,7 +16,7 @@ """imports checkers for Python code""" from logilab.common.graph import get_cycles, DotBackend -from logilab.common.modutils import is_standard_module +from logilab.common.modutils import get_module_part, is_standard_module from logilab.common.ureports import VerbatimText, Paragraph import astroid @@ -292,6 +292,7 @@ given file (report RP0402 must not be disabled)'} def _add_imported_module(self, node, importedmodname): """notify an imported module, used to analyze dependencies""" + importedmodname = get_module_part(importedmodname) context_name = node.root().name if context_name == importedmodname: # module importing itself ! |