Skip to content

Commit

Permalink
Explicitly return None on certain functions
Browse files Browse the repository at this point in the history
 This fixes some `inconsistent-return-statement` pylint errors
  • Loading branch information
rtpg authored and Pierre-Sassoulas committed Oct 28, 2020
1 parent 46633c5 commit 72ff0fd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion astroid/interpreter/_import/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ def _is_setuptools_namespace(location):
with open(os.path.join(location, "__init__.py"), "rb") as stream:
data = stream.read(4096)
except IOError:
pass
return None
else:
extend_path = b"pkgutil" in data and b"extend_path" in data
declare_namespace = (
Expand Down
2 changes: 1 addition & 1 deletion astroid/node_classes.py
Original file line number Diff line number Diff line change
Expand Up @@ -968,7 +968,7 @@ def next_sibling(self):
try:
return stmts[index + 1]
except IndexError:
pass
return None

def previous_sibling(self):
"""The previous sibling statement.
Expand Down

0 comments on commit 72ff0fd

Please sign in to comment.