Skip to content

Commit

Permalink
[pylint 2.16] Fix unnecessary 'else' after 'return'
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Dec 21, 2022
1 parent 0391999 commit 9f90f47
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions astroid/interpreter/_import/spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,11 @@ def _is_setuptools_namespace(location: pathlib.Path) -> bool:
data = stream.read(4096)
except OSError:
return False
else:
extend_path = b"pkgutil" in data and b"extend_path" in data
declare_namespace = (
b"pkg_resources" in data and b"declare_namespace(__name__)" in data
)
return extend_path or declare_namespace
extend_path = b"pkgutil" in data and b"extend_path" in data
declare_namespace = (
b"pkg_resources" in data and b"declare_namespace(__name__)" in data
)
return extend_path or declare_namespace


def _get_zipimporters() -> Iterator[tuple[str, zipimport.zipimporter]]:
Expand Down

0 comments on commit 9f90f47

Please sign in to comment.