diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2015-11-20 12:52:19 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2015-11-20 12:52:19 +0200 |
commit | fb6b47b10084423e6c43a30538cb8eca39ce7408 (patch) | |
tree | ba07148af593966260188a6b09fddcd4379a95f6 /pylint/checkers/logging.py | |
parent | f137fdb1f38054fc5a1a967dbe6ff37a12ab9adb (diff) | |
download | pylint-fb6b47b10084423e6c43a30538cb8eca39ce7408.tar.gz |
Import has_known_bases and safe_infer back into pylint from astroid, until the latter stabilizes its API.
Currently astroid goes into a total revamp, having a couple of development branches with partially
incompatible APIs, which means that pylint can't rely on the exact location of has_known_bases
and safe_infer until astroid reaches a new major release. With this in mind, these two
functions are backported in pylint again.
Diffstat (limited to 'pylint/checkers/logging.py')
-rw-r--r-- | pylint/checkers/logging.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/pylint/checkers/logging.py b/pylint/checkers/logging.py index 9ef85dd..a5b1edf 100644 --- a/pylint/checkers/logging.py +++ b/pylint/checkers/logging.py @@ -15,7 +15,6 @@ """ import astroid -from astroid import helpers from pylint import checkers from pylint import interfaces @@ -80,7 +79,7 @@ def is_method_call(callfunc_node, types=(), methods=()): """ if not isinstance(callfunc_node, astroid.Call): return False - func = helpers.safe_infer(callfunc_node.func) + func = utils.safe_infer(callfunc_node.func) return (isinstance(func, astroid.BoundMethod) and isinstance(func.bound, astroid.Instance) and (func.bound.name in types if types else True) |