Skip to content

Commit 2e8aae8

Browse files
committed
Spelling and comments
1 parent adade73 commit 2e8aae8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

astroid/interpreter/_import/util.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def _is_old_setuptools_namespace_package(modname: str) -> bool:
3131
def is_namespace(modname: str) -> bool:
3232
"""Determine whether we encounter a namespace package."""
3333
if PY36:
34-
# On Pyhton 3.6 an AttributeError is raised when a package
34+
# On Python 3.6 an AttributeError is raised when a package
3535
# is lacking a __path__ attribute and thus is not a
3636
# package.
3737
try:
@@ -61,6 +61,7 @@ def is_namespace(modname: str) -> bool:
6161
if not isinstance(spec.loader, abc.InspectLoader):
6262
return True
6363

64+
# Lastly we check if the package declares itself a namespace package
6465
source = spec.loader.get_source(spec.origin)
6566
return bool(
6667
source and "pkg_resources" in source and "declare_namespace(__name__)" in source

0 commit comments

Comments
 (0)