Skip to content

Commit a64f74e

Browse files
parent all redefinition notes correctly
1 parent 1ba24c5 commit a64f74e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mypy/messages.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1516,9 +1516,9 @@ def incompatible_conditional_function_def(
15161516
if isinstance(old_type, (CallableType, Overloaded)) and isinstance(
15171517
new_type, (CallableType, Overloaded)
15181518
):
1519-
self.note("Original:", defn)
1519+
self.note("Original:", defn, parent_error=error)
15201520
self.pretty_callable_or_overload(old_type, defn, offset=4, parent_error=error)
1521-
self.note("Redefinition:", defn)
1521+
self.note("Redefinition:", defn, parent_error=error)
15221522
self.pretty_callable_or_overload(new_type, defn, offset=4, parent_error=error)
15231523

15241524
def cannot_instantiate_abstract_class(

0 commit comments

Comments
 (0)