File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
astroid/interpreter/_import Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def _is_old_setuptools_namespace_package(modname: str) -> bool:
3131def 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
You can’t perform that action at this time.
0 commit comments