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

Method construct

src/git_sim/branch.py:13–54  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

11 self.cmd += f"{type(self).__name__.lower()} {self.name}"
12
13 def construct(self):
14 if not settings.stdout and not settings.output_only_path and not settings.quiet:
15 print(f"{settings.INFO_STRING} {self.cmd}")
16
17 self.show_intro()
18 self.parse_commits()
19 self.parse_all()
20 self.center_frame_on_commit(self.get_commit())
21
22 branchText = m.Text(
23 self.name,
24 font=self.font,
25 font_size=20,
26 color=self.fontColor,
27 )
28 branchRec = m.Rectangle(
29 color=m.GREEN,
30 fill_color=m.GREEN,
31 fill_opacity=0.25,
32 height=0.4,
33 width=branchText.width + 0.25,
34 )
35
36 branchRec.next_to(self.topref, m.UP)
37 branchText.move_to(branchRec.get_center())
38
39 fullbranch = m.VGroup(branchRec, branchText)
40
41 if settings.animate:
42 self.play(m.Create(fullbranch), run_time=1 / settings.speed)
43 else:
44 self.add(fullbranch)
45
46 self.toFadeOut.add(branchRec, branchText)
47 self.drawnRefs[self.name] = fullbranch
48
49 self.recenter_frame()
50 self.scale_frame()
51 self.color_by()
52 self.show_command_as_title()
53 self.fadeout()
54 self.show_outro()

Callers

nothing calls this directly

Calls 11

show_introMethod · 0.80
parse_commitsMethod · 0.80
parse_allMethod · 0.80
get_commitMethod · 0.80
recenter_frameMethod · 0.80
scale_frameMethod · 0.80
color_byMethod · 0.80
show_command_as_titleMethod · 0.80
fadeoutMethod · 0.80
show_outroMethod · 0.80

Tested by

no test coverage detected