diff options
author | Claudiu Popa <pcmanticore@gmail.com> | 2016-05-09 14:19:00 +0300 |
---|---|---|
committer | Claudiu Popa <pcmanticore@gmail.com> | 2016-05-09 14:19:00 +0300 |
commit | becc6f94a4ff8d0859c3a1c3f0a13f65528f84cf (patch) | |
tree | e59e31bfee18312a3b97ba6e5dcfed8057248d05 /astroid/builder.py | |
parent | 5641f4c2a6ae5a5915cfe73a04625cad9740f799 (diff) | |
download | astroid-git-becc6f94a4ff8d0859c3a1c3f0a13f65528f84cf.tar.gz |
Build a dummy module object for namespace directories and add a test for multiple directories contributing to the same namespace.
Diffstat (limited to 'astroid/builder.py')
-rw-r--r-- | astroid/builder.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/astroid/builder.py b/astroid/builder.py index 48001e5b..e26d0aeb 100644 --- a/astroid/builder.py +++ b/astroid/builder.py @@ -33,6 +33,7 @@ from astroid import manager from astroid import modutils from astroid import raw_building from astroid import rebuilder +from astroid import nodes from astroid import util @@ -263,6 +264,10 @@ class AstroidBuilder(raw_building.InspectBuilder): pass +def build_namespace_package_module(name, path): + return nodes.Module(name, doc='', path=path, package=True) + + def parse(code, module_name='', path=None, apply_transforms=True): """Parses a source string in order to obtain an astroid AST from it |