summaryrefslogtreecommitdiff
path: root/Cython/Compiler/ParseTreeTransforms.py
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2018-07-23 19:09:17 +0200
committerStefan Behnel <stefan_ml@behnel.de>2018-07-23 19:09:17 +0200
commitcffb63d39c74c2c3ee0e3cc077c5a770b1818c21 (patch)
treeef7aa8d71106bdab3a8bbcaa58d38a6e12f6f7d9 /Cython/Compiler/ParseTreeTransforms.py
parent640fe60ba255bf920c726fb93617e38e1212d26f (diff)
downloadcython-cffb63d39c74c2c3ee0e3cc077c5a770b1818c21.tar.gz
Simplify code to format it better.
Diffstat (limited to 'Cython/Compiler/ParseTreeTransforms.py')
-rw-r--r--Cython/Compiler/ParseTreeTransforms.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Cython/Compiler/ParseTreeTransforms.py b/Cython/Compiler/ParseTreeTransforms.py
index 96a5d9500..d9cb6498d 100644
--- a/Cython/Compiler/ParseTreeTransforms.py
+++ b/Cython/Compiler/ParseTreeTransforms.py
@@ -613,8 +613,8 @@ class TrackNumpyAttributes(VisitorTransform, SkipDeclarations):
def visit_AttributeNode(self, node):
self.visitchildren(node)
- if (node.obj.is_name and node.obj.name in self.numpy_module_names) or \
- node.obj.is_numpy_attribute:
+ obj = node.obj
+ if (obj.is_name and obj.name in self.numpy_module_names) or obj.is_numpy_attribute:
node.is_numpy_attribute = True
return node