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

Method read

mypy/types.py:2636–2657  ·  view source on GitHub ↗
(cls, data: ReadBuffer)

Source from the content-addressed store, hash-verified

2634
2635 @classmethod
2636 def read(cls, data: ReadBuffer) -> CallableType:
2637 assert read_tag(data) == INSTANCE
2638 fallback = Instance.read(data)
2639 ret = CallableType(
2640 read_type_list(data),
2641 [ARG_KINDS[ak] for ak in read_int_list(data)],
2642 read_str_opt_list(data),
2643 read_type(data),
2644 fallback,
2645 name=read_str_opt(data),
2646 variables=read_type_var_likes(data),
2647 is_ellipsis_args=read_bool(data),
2648 implicit=read_bool(data),
2649 is_bound=read_bool(data),
2650 type_guard=read_type_opt(data),
2651 type_is=read_type_opt(data),
2652 from_concatenate=read_bool(data),
2653 imprecise_arg_kinds=read_bool(data),
2654 unpack_kwargs=read_bool(data),
2655 )
2656 assert read_tag(data) == END_TAG
2657 return ret
2658
2659
2660# This is a little safety net to prevent reckless special-casing of callables

Callers

nothing calls this directly

Calls 9

read_int_listFunction · 0.90
read_str_opt_listFunction · 0.90
read_str_optFunction · 0.90
CallableTypeClass · 0.85
read_type_listFunction · 0.85
read_type_var_likesFunction · 0.85
read_type_optFunction · 0.85
read_typeFunction · 0.70
readMethod · 0.45

Tested by

no test coverage detected