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

Method check_type

mypy/checkstrformat.py:906–910  ·  view source on GitHub ↗
(type: Type)

Source from the content-addressed store, hash-verified

904 expected = self.named_type("builtins.int")
905
906 def check_type(type: Type) -> bool:
907 expected = self.named_type("builtins.int")
908 return self.chk.check_subtype(
909 type, expected, context, "* wants int", code=codes.STRING_FORMATTING
910 )
911
912 def check_expr(expr: Expression) -> None:
913 type = self.accept(expr, expected)

Callers

nothing calls this directly

Calls 5

named_typeMethod · 0.95
check_s_special_casesMethod · 0.95
isinstanceFunction · 0.85
check_subtypeMethod · 0.45

Tested by

no test coverage detected