@@ -95,7 +95,6 @@ def __init__(
9595 is_operator : bool ,
9696 original_type : Type ,
9797 context : Context ,
98- msg : MessageBuilder ,
9998 chk : mypy .checker .TypeChecker ,
10099 self_type : Type | None ,
101100 module_symbol_table : SymbolTable | None = None ,
@@ -108,8 +107,8 @@ def __init__(
108107 self .original_type = original_type
109108 self .self_type = self_type or original_type
110109 self .context = context # Error context
111- self .msg = msg
112110 self .chk = chk
111+ self .msg = chk .msg
113112 self .module_symbol_table = module_symbol_table
114113 self .no_deferral = no_deferral
115114 self .is_self = is_self
@@ -123,7 +122,6 @@ def not_ready_callback(self, name: str, context: Context) -> None:
123122 def copy_modified (
124123 self ,
125124 * ,
126- messages : MessageBuilder | None = None ,
127125 self_type : Type | None = None ,
128126 is_lvalue : bool | None = None ,
129127 original_type : Type | None = None ,
@@ -134,14 +132,11 @@ def copy_modified(
134132 is_operator = self .is_operator ,
135133 original_type = self .original_type ,
136134 context = self .context ,
137- msg = self .msg ,
138135 chk = self .chk ,
139136 self_type = self .self_type ,
140137 module_symbol_table = self .module_symbol_table ,
141138 no_deferral = self .no_deferral ,
142139 )
143- if messages is not None :
144- mx .msg = messages
145140 if self_type is not None :
146141 mx .self_type = self_type
147142 if is_lvalue is not None :
@@ -159,7 +154,6 @@ def analyze_member_access(
159154 is_lvalue : bool ,
160155 is_super : bool ,
161156 is_operator : bool ,
162- msg : MessageBuilder ,
163157 original_type : Type ,
164158 chk : mypy .checker .TypeChecker ,
165159 override_info : TypeInfo | None = None ,
@@ -198,7 +192,6 @@ def analyze_member_access(
198192 is_operator = is_operator ,
199193 original_type = original_type ,
200194 context = context ,
201- msg = msg ,
202195 chk = chk ,
203196 self_type = self_type ,
204197 module_symbol_table = module_symbol_table ,
0 commit comments