(cls, buf: ReadBuffer, manager: BuildManager)
| 2956 | |
| 2957 | @classmethod |
| 2958 | def read(cls, buf: ReadBuffer, manager: BuildManager) -> State: |
| 2959 | order = read_int(buf) |
| 2960 | id = read_str(buf) |
| 2961 | path = read_str_opt(buf) |
| 2962 | source = read_str_opt(buf) |
| 2963 | ignore_all = read_bool(buf) |
| 2964 | caller_line = read_int(buf) |
| 2965 | assert read_tag(buf) == LIST_GEN |
| 2966 | import_context = [(read_str(buf), read_int(buf)) for _ in range(read_int_bare(buf))] |
| 2967 | interface_hash = read_bytes(buf) |
| 2968 | meta_source_hash = read_str_opt(buf) |
| 2969 | dependencies = read_str_list(buf) |
| 2970 | suppressed = read_str_list(buf) |
| 2971 | assert read_tag(buf) == DICT_STR_GEN |
| 2972 | priorities = {read_str_bare(buf): read_int(buf) for _ in range(read_int_bare(buf))} |
| 2973 | assert read_tag(buf) == DICT_STR_GEN |
| 2974 | dep_line_map = {read_str_bare(buf): read_int(buf) for _ in range(read_int_bare(buf))} |
| 2975 | assert read_tag(buf) == DICT_STR_GEN |
| 2976 | dep_hashes = {read_str_bare(buf): read_bytes(buf) for _ in range(read_int_bare(buf))} |
| 2977 | return cls( |
| 2978 | manager=manager, |
| 2979 | order=order, |
| 2980 | id=id, |
| 2981 | path=path, |
| 2982 | source=source, |
| 2983 | # The caller must call clone_for_module(). |
| 2984 | options=manager.options, |
| 2985 | ignore_all=ignore_all, |
| 2986 | caller_line=caller_line, |
| 2987 | import_context=import_context, |
| 2988 | meta=None, |
| 2989 | interface_hash=interface_hash, |
| 2990 | meta_source_hash=meta_source_hash, |
| 2991 | dependencies=dependencies, |
| 2992 | suppressed=suppressed, |
| 2993 | priorities=priorities, |
| 2994 | dep_line_map=dep_line_map, |
| 2995 | dep_hashes=dep_hashes, |
| 2996 | error_lines=[], |
| 2997 | imports_ignored={}, |
| 2998 | size_hint=read_int(buf), |
| 2999 | ) |
| 3000 | |
| 3001 | def reload_meta(self) -> None: |
| 3002 | """Force reload of cache meta. |
no test coverage detected