diff options
author | Ceridwen <ceridwenv@gmail.com> | 2015-07-11 22:50:06 -0400 |
---|---|---|
committer | Ceridwen <ceridwenv@gmail.com> | 2015-07-11 22:50:06 -0400 |
commit | d5be6c1926d6fa02b49b320faee5edb1e04f9fae (patch) | |
tree | cd91b390e8564c73e35451f27aad7cccf3bd501c /astroid/nodes.py | |
parent | b63c90162e44e932b9ecc64ff8fa46cf66079c1c (diff) | |
download | astroid-git-d5be6c1926d6fa02b49b320faee5edb1e04f9fae.tar.gz |
Fix isinstance/proxy bug by changing from lazy-object-proxy to wrapt and minor fixes
Diffstat (limited to 'astroid/nodes.py')
-rw-r--r-- | astroid/nodes.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/astroid/nodes.py b/astroid/nodes.py index 45b8e37a..d74effd0 100644 --- a/astroid/nodes.py +++ b/astroid/nodes.py @@ -38,7 +38,7 @@ on ImportFrom and Import : __docformat__ = "restructuredtext en" -import lazy_object_proxy +import wrapt from astroid.node_classes import ( Arguments, AssignAttr, Assert, Assign, @@ -82,7 +82,7 @@ ALL_NODE_CLASSES = ( # Backward-compatibility aliases def proxy_alias(alias_name, node_type): - proxy = type(alias_name, (lazy_object_proxy.Proxy,), + proxy = type(alias_name, (wrapt.ObjectProxy,), {'__class__': object.__dict__['__class__']}) return proxy(node_type) @@ -90,8 +90,9 @@ Backquote = proxy_alias('Backquote', Repr) Discard = proxy_alias('Discard', Expr) AssName = proxy_alias('AssName', AssignName) AssAttr = proxy_alias('AssAttr', AssignAttr) -GetAttr = proxy_alias('GetAttr', Attribute) +Getattr = proxy_alias('Getattr', Attribute) CallFunc = proxy_alias('CallFunc', Call) Class = proxy_alias('Class', ClassDef) Function = proxy_alias('Function', FunctionDef) GenExpr = proxy_alias('GenExpr', GeneratorExp) +From = proxy_alias('From', ImportFrom) |