diff options
-rw-r--r-- | astroid/modutils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/astroid/modutils.py b/astroid/modutils.py index d198be7c..a0f3318f 100644 --- a/astroid/modutils.py +++ b/astroid/modutils.py @@ -633,3 +633,10 @@ def _has_init(directory): if os.path.exists(mod_or_pack + '.' + ext): return mod_or_pack + '.' + ext return None + + +def is_namespace(specobj): + return specobj.type == spec.ModuleType.PY_NAMESPACE + +def is_directory(specobj): + return specobj.type == spec.ModuleType.PKG_DIRECTORY |