diff options
author | Ceridwen <ceridwenv@gmail.com> | 2015-07-13 21:47:10 -0400 |
---|---|---|
committer | Ceridwen <ceridwenv@gmail.com> | 2015-07-13 21:47:10 -0400 |
commit | 94520560b047a12b5e277fd73400491e8dc1172d (patch) | |
tree | 040858d60d4ff44c5778c64ddab0c4deb3410b31 /astroid/nodes.py | |
parent | d5be6c1926d6fa02b49b320faee5edb1e04f9fae (diff) | |
download | astroid-git-94520560b047a12b5e277fd73400491e8dc1172d.tar.gz |
Fix code review comments.
Added aliases for inferred() and assign_type(), refactor some uses of
ternary if, remove some now-unused internal functions in rebuilder,
replaced the mutating docstring function with one that returns values
as well as side-effects, change back to lazy-object-proxy, and add keyword
args to the Module call in rebuilder.
Diffstat (limited to 'astroid/nodes.py')
-rw-r--r-- | astroid/nodes.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/astroid/nodes.py b/astroid/nodes.py index d74effd0..07fe8594 100644 --- a/astroid/nodes.py +++ b/astroid/nodes.py @@ -38,7 +38,7 @@ on ImportFrom and Import : __docformat__ = "restructuredtext en" -import wrapt +import lazy_object_proxy from astroid.node_classes import ( Arguments, AssignAttr, Assert, Assign, @@ -82,9 +82,9 @@ ALL_NODE_CLASSES = ( # Backward-compatibility aliases def proxy_alias(alias_name, node_type): - proxy = type(alias_name, (wrapt.ObjectProxy,), + proxy = type(alias_name, (lazy_object_proxy.Proxy,), {'__class__': object.__dict__['__class__']}) - return proxy(node_type) + return proxy(lambda: node_type) Backquote = proxy_alias('Backquote', Repr) Discard = proxy_alias('Discard', Expr) |