MCPcopy Index your code
hub / github.com/initialcommit-com/git-sim / render_remote_data

Method render_remote_data

src/git_sim/remote.py:250–384  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

248 self.project_root = new_rect
249
250 def render_remote_data(self):
251 for i, section in enumerate(self.config.sections()):
252 if "remote" in section:
253 if self.command == RemoteSubCommand.RENAME and self.remote in section:
254 section_text = (
255 m.Text(
256 f'[remote "{self.url_or_path}"]',
257 font=self.font,
258 color=self.fontColor,
259 font_size=20,
260 weight=m.BOLD,
261 )
262 .align_to(self.last_element, m.UP)
263 .shift(self.down_shift)
264 .align_to(self.config_text, m.LEFT)
265 .shift(m.RIGHT * 0.5)
266 )
267 elif self.command == RemoteSubCommand.REMOVE and self.remote in section:
268 section_text = (
269 m.MarkupText(
270 "<span strikethrough='true' strikethrough_color='"
271 + self.fontColor
272 + "'>"
273 + f"[{section}]"
274 + "</span>",
275 font=self.font,
276 color=self.fontColor,
277 font_size=20,
278 weight=m.BOLD,
279 )
280 .align_to(self.last_element, m.UP)
281 .shift(self.down_shift)
282 .align_to(self.config_text, m.LEFT)
283 .shift(m.RIGHT * 0.5)
284 )
285 else:
286 section_text = (
287 m.Text(
288 f"[{section}]",
289 font=self.font,
290 color=self.fontColor,
291 font_size=20,
292 )
293 .align_to(self.last_element, m.UP)
294 .shift(self.down_shift)
295 .align_to(self.config_text, m.LEFT)
296 .shift(m.RIGHT * 0.5)
297 )
298 self.toFadeOut.add(section_text)
299 if settings.animate:
300 self.play(
301 m.AddTextLetterByLetter(
302 section_text, time_per_char=self.time_per_char
303 )
304 )
305 else:
306 self.add(section_text)
307 self.last_element = section_text

Callers 1

add_detailsMethod · 0.95

Calls 1

resize_rectangleMethod · 0.95

Tested by

no test coverage detected