MCPcopy Index your code
hub / github.com/Codeplain-ai/codeplain / get_all_affected_modules_from_change

Function get_all_affected_modules_from_change

partial_rendering.py:119–144  ·  view source on GitHub ↗
(
    plain_module: PlainModule,
    plain_module_render_state: PlainModuleRenderState,
)

Source from the content-addressed store, hash-verified

117
118
119def get_all_affected_modules_from_change(
120 plain_module: PlainModule,
121 plain_module_render_state: PlainModuleRenderState,
122) -> list[PlainModule]:
123 all_affected_modules = dict[str, PlainModule]()
124
125 if plain_module_render_state.change_type == "spec_change":
126 start_module = plain_module_render_state.change
127 elif plain_module_render_state.change_type == "code_change":
128 if plain_module_render_state.change.is_module_fully_rendered():
129 start_module = plain_module.get_next_module(plain_module_render_state.change.module_name)
130 else:
131 start_module = plain_module_render_state.change
132 else:
133 raise ValueError(f"Unknown change type: {plain_module_render_state.change_type}")
134
135 affected_module = False
136 all_modules = plain_module.all_required_modules + [plain_module]
137 for module in all_modules:
138 if module.module_name == start_module.module_name:
139 affected_module = True
140
141 if affected_module and module.module_name not in all_affected_modules:
142 all_affected_modules[module.module_name] = module
143
144 return list(all_affected_modules.values())
145
146
147def change_is_only_future_work(

Callers 2

get_msg_from_choiceMethod · 0.90
get_render_choicesFunction · 0.85

Calls 2

get_next_moduleMethod · 0.45

Tested by

no test coverage detected