Skip to content

Commit

Permalink
Merge pull request kevinw#21 from jehiah/fix_python2_5
Browse files Browse the repository at this point in the history
fix for python 2.5
  • Loading branch information
kevinw committed Sep 20, 2012
2 parents 1e36a53 + f6f91a9 commit 06e149a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions pyflakes/checker.py
Original file line number Diff line number Diff line change
Expand Up @@ -528,9 +528,15 @@ def FUNCTIONDEF(self, node):

# Check for property decorator
func_def = FunctionDefinition(node.name, node)
for decorator in node.decorator_list:
if getattr(decorator, 'attr', None) in ('setter', 'deleter'):
func_def._property_decorator = True

if hasattr(node, 'decorators'):
for decorator in node.decorators:
if getattr(decorator, 'attr', None) in ('setter', 'deleter'):
func_def._property_decorator = True
else:
for decorator in node.decorator_list:
if getattr(decorator, 'attr', None) in ('setter', 'deleter'):
func_def._property_decorator = True

self.addBinding(node, func_def)
self.LAMBDA(node)
Expand Down

0 comments on commit 06e149a

Please sign in to comment.