MCPcopy Index your code
hub / github.com/python/mypy / maybe_note_about_special_args

Method maybe_note_about_special_args

mypy/messages.py:976–987  ·  view source on GitHub ↗
(self, callee: CallableType, context: Context)

Source from the content-addressed store, hash-verified

974 self.maybe_note_about_special_args(callee, context)
975
976 def maybe_note_about_special_args(self, callee: CallableType, context: Context) -> None:
977 if self.prefer_simple_messages():
978 return
979 # https://github.com/python/mypy/issues/11309
980 first_arg = get_first_arg(callee)
981 if first_arg and first_arg not in {"self", "cls", "mcs"}:
982 self.note(
983 "Looks like the first special argument in a method "
984 'is not named "self", "cls", or "mcs", '
985 "maybe it is missing?",
986 context,
987 )
988
989 def unexpected_keyword_argument_for_function(
990 self, for_func: str, name: str, context: Context, *, matches: list[str] | None = None

Callers 2

too_many_argumentsMethod · 0.95

Calls 3

noteMethod · 0.95
get_first_argFunction · 0.70

Tested by

no test coverage detected