@@ -1228,7 +1228,7 @@ def handleNodeStore(self, node):
1228
1228
binding = Binding (name , node )
1229
1229
elif name == '__all__' and isinstance (self .scope , ModuleScope ):
1230
1230
binding = ExportBinding (name , node ._pyflakes_parent , self .scope )
1231
- elif isinstance (getattr (node , 'ctx' , None ), ast .Param ):
1231
+ elif PY2 and isinstance (getattr (node , 'ctx' , None ), ast .Param ):
1232
1232
binding = Argument (name , self .getScopeNode (node ))
1233
1233
else :
1234
1234
binding = Assignment (name , node )
@@ -1888,13 +1888,15 @@ def NAME(self, node):
1888
1888
Handle occurrence of Name (which can be a load/store/delete access.)
1889
1889
"""
1890
1890
# Locate the name in locals / function / globals scopes.
1891
- if isinstance (node .ctx , ( ast .Load , ast . AugLoad ) ):
1891
+ if isinstance (node .ctx , ast .Load ):
1892
1892
self .handleNodeLoad (node )
1893
1893
if (node .id == 'locals' and isinstance (self .scope , FunctionScope ) and
1894
1894
isinstance (node ._pyflakes_parent , ast .Call )):
1895
1895
# we are doing locals() call in current scope
1896
1896
self .scope .usesLocals = True
1897
- elif isinstance (node .ctx , (ast .Store , ast .AugStore , ast .Param )):
1897
+ elif isinstance (node .ctx , ast .Store ):
1898
+ self .handleNodeStore (node )
1899
+ elif PY2 and isinstance (node .ctx , ast .Param ):
1898
1900
self .handleNodeStore (node )
1899
1901
elif isinstance (node .ctx , ast .Del ):
1900
1902
self .handleNodeDelete (node )
0 commit comments