summaryrefslogtreecommitdiff
path: root/pyflakes/checker.py
diff options
context:
space:
mode:
Diffstat (limited to 'pyflakes/checker.py')
-rw-r--r--pyflakes/checker.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/pyflakes/checker.py b/pyflakes/checker.py
index e927715..4d778a8 100644
--- a/pyflakes/checker.py
+++ b/pyflakes/checker.py
@@ -263,6 +263,11 @@ class Definition(Binding):
"""
A binding that defines a function or a class.
"""
+ def redefines(self, other):
+ return (
+ super().redefines(other) or
+ (isinstance(other, Assignment) and self.name == other.name)
+ )
class Builtin(Definition):