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

Method check_subtype

mypy/checker.py:7587–7599  ·  view source on GitHub ↗
(
        self,
        subtype: Type,
        supertype: Type,
        context: Context,
        msg: str,
        subtype_label: str | None = None,
        supertype_label: str | None = None,
        *,
        notes: list[str] | None = None,
        code: ErrorCode | None = None,
        outer_context: Context | None = None,
    )

Source from the content-addressed store, hash-verified

7585 #
7586 @overload
7587 def check_subtype(
7588 self,
7589 subtype: Type,
7590 supertype: Type,
7591 context: Context,
7592 msg: str,
7593 subtype_label: str | None = None,
7594 supertype_label: str | None = None,
7595 *,
7596 notes: list[str] | None = None,
7597 code: ErrorCode | None = None,
7598 outer_context: Context | None = None,
7599 ) -> bool: ...
7600
7601 @overload
7602 def check_subtype(

Callers 15

check_func_defMethod · 0.95
check_return_stmtMethod · 0.95
type_check_raiseMethod · 0.95
visit_enum_index_exprMethod · 0.45
visit_yield_exprMethod · 0.45

Calls 15

failMethod · 0.95
with_additional_msgMethod · 0.95
noteMethod · 0.95
is_subtypeFunction · 0.90
ErrorMessageClass · 0.90
get_proper_typeFunction · 0.90
format_type_distinctlyFunction · 0.90
make_inferred_type_noteFunction · 0.90
append_invariance_notesFunction · 0.90
append_union_noteFunction · 0.90
find_memberFunction · 0.90

Tested by

no test coverage detected