diff options
author | hippo91 <guillaume.peillex@gmail.com> | 2017-09-26 17:03:42 +0200 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2017-09-26 17:03:42 +0200 |
commit | 56a6723f96dddd1e70e668d808e8446fd53b841f (patch) | |
tree | cbead24fb86338441114e4cdc9245ac540a8d10c /pylint/checkers/variables.py | |
parent | 8dd70cb76439d72ea02ade02ae0dfa028a46619c (diff) | |
download | pylint-git-56a6723f96dddd1e70e668d808e8446fd53b841f.tar.gz |
Adding a check for ``inconsistent-return-statements`` inside function or methods. (#1641)
Close #1267
Diffstat (limited to 'pylint/checkers/variables.py')
-rw-r--r-- | pylint/checkers/variables.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pylint/checkers/variables.py b/pylint/checkers/variables.py index 604708991..cd0691c56 100644 --- a/pylint/checkers/variables.py +++ b/pylint/checkers/variables.py @@ -44,12 +44,13 @@ def _is_from_future_import(stmt, name): try: module = stmt.do_import_module(stmt.modname) except astroid.AstroidBuildingException: - return + return None for local_node in module.locals.get(name, []): if (isinstance(local_node, astroid.ImportFrom) and local_node.modname == FUTURE): return True + return None def in_for_else_branch(parent, stmt): @@ -203,6 +204,7 @@ def _find_frame_imports(name, frame): return True elif import_name and import_name == name: return True + return None def _import_name_is_global(stmt, global_names): |