Commits

Virgil Dupras committed 1b2bffb

Consider a function that is called on the right part of an augassign operation to be used.

  • Participants
  • Parent commits 6b8bfc9

Comments (0)

Files changed (2)

File pyflakes/checker.py

 
     def AUGASSIGN(self, node):
         self.handleNodeLoad(node.target)
-        self.handleNodeLoad(node.value)
+        self.handleNode(node.value, node)
         self.handleNodeStore(node.target)
 
     def IMPORT(self, node):

File pyflakes/test/test_other.py

             try: pass
             except Exception: pass
         ''')
+    
+    def test_augassign_imported_function_call(self):
+        """Consider a function that is called on the right part of an augassign operation to be
+        used.
+        """
+        self.flakes('''
+        from foo import bar
+        baz = 0
+        baz += bar()
+        ''')
+