MCPcopy
hub / github.com/python/mypy / visit_parameters

Method visit_parameters

mypy/join.py:328–342  ·  view source on GitHub ↗
(self, t: Parameters)

Source from the content-addressed store, hash-verified

326 raise NotImplementedError
327
328 def visit_parameters(self, t: Parameters) -> ProperType:
329 if isinstance(self.s, Parameters):
330 if not is_similar_params(t, self.s):
331 # TODO: it would be prudent to return [*object, **object] instead of Any.
332 return self.default(self.s)
333 from mypy.meet import meet_types
334
335 return t.copy_modified(
336 arg_types=[
337 meet_types(s_a, t_a) for s_a, t_a in zip(self.s.arg_types, t.arg_types)
338 ],
339 arg_names=combine_arg_names(self.s, t),
340 )
341 else:
342 return self.default(self.s)
343
344 def visit_instance(self, t: Instance) -> ProperType:
345 if isinstance(self.s, Instance):

Callers

nothing calls this directly

Calls 7

defaultMethod · 0.95
meet_typesFunction · 0.90
isinstanceFunction · 0.85
is_similar_paramsFunction · 0.85
zipFunction · 0.85
combine_arg_namesFunction · 0.85
copy_modifiedMethod · 0.45

Tested by

no test coverage detected