(cls, data: ReadBuffer)
| 919 | |
| 920 | @classmethod |
| 921 | def read(cls, data: ReadBuffer) -> OverloadedFuncDef: |
| 922 | assert read_tag(data) == LIST_GEN |
| 923 | res = OverloadedFuncDef([read_overload_part(data) for _ in range(read_int_bare(data))]) |
| 924 | typ = mypy.types.read_type_opt(data) |
| 925 | if typ is not None: |
| 926 | assert isinstance(typ, mypy.types.ProperType) |
| 927 | res.type = typ |
| 928 | res._fullname = read_str(data) |
| 929 | tag = read_tag(data) |
| 930 | if tag != LITERAL_NONE: |
| 931 | res.impl = read_overload_part(data, tag) |
| 932 | # set line for empty overload items, as not set in __init__ |
| 933 | if len(res.items) > 0: |
| 934 | res.set_line(res.impl.line) |
| 935 | res.is_property, res.is_class, res.is_static, res.is_final = read_flags(data, num_flags=4) |
| 936 | res.deprecated = read_str_opt(data) |
| 937 | res.setter_index = read_int_opt(data) |
| 938 | # NOTE: res.info will be set in the fixup phase. |
| 939 | assert read_tag(data) == END_TAG |
| 940 | return res |
| 941 | |
| 942 | def is_dynamic(self) -> bool: |
| 943 | return all(item.is_dynamic() for item in self.items) |
nothing calls this directly
no test coverage detected