diff options
| author | Claudiu Popa <pcmanticore@gmail.com> | 2017-08-07 11:46:02 +0200 |
|---|---|---|
| committer | Claudiu Popa <pcmanticore@gmail.com> | 2017-08-07 11:46:43 +0200 |
| commit | 1aa0874f24a37d934a590a9b5e7482bf7f629900 (patch) | |
| tree | aeffe12d27de34e6291cd3507881ccefd69fd533 /pylint/checkers/python3.py | |
| parent | 7d6114fe71f1e6ab4a7c19546f380a7cb216eac9 (diff) | |
| download | pylint-git-1aa0874f24a37d934a590a9b5e7482bf7f629900.tar.gz | |
Fix a false positive with bad-python3-import on relative imports
Close #1608
Diffstat (limited to 'pylint/checkers/python3.py')
| -rw-r--r-- | pylint/checkers/python3.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pylint/checkers/python3.py b/pylint/checkers/python3.py index c47293bac..a558cbf49 100644 --- a/pylint/checkers/python3.py +++ b/pylint/checkers/python3.py @@ -647,7 +647,7 @@ class Python3Checker(checkers.BaseChecker): if not self._future_absolute_import: if self.linter.is_message_enabled('no-absolute-import'): self.add_message('no-absolute-import', node=node) - if not _is_conditional_import(node): + if not _is_conditional_import(node) and not node.level: self._warn_if_deprecated(node, node.modname, {x[0] for x in node.names}) if node.names[0][0] == '*': |
