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

Method deleted_as_rvalue

mypy/messages.py:1052–1058  ·  view source on GitHub ↗

Report an error about using an deleted type as an rvalue.

(self, typ: DeletedType, context: Context)

Source from the content-addressed store, hash-verified

1050 self.fail(message, context, code=codes.FUNC_RETURNS_VALUE)
1051
1052 def deleted_as_rvalue(self, typ: DeletedType, context: Context) -> None:
1053 """Report an error about using an deleted type as an rvalue."""
1054 if typ.source is None:
1055 s = ""
1056 else:
1057 s = f' "{typ.source}"'
1058 self.fail(f"Trying to read deleted variable{s}", context)
1059
1060 def deleted_as_lvalue(self, typ: DeletedType, context: Context) -> None:
1061 """Report an error about using an deleted type as an lvalue.

Callers 7

infer_variable_typeMethod · 0.80
visit_if_stmtMethod · 0.80
type_check_raiseMethod · 0.80
visit_match_stmtMethod · 0.80
_analyze_member_accessFunction · 0.80
check_argMethod · 0.80

Calls 1

failMethod · 0.95

Tested by

no test coverage detected