Skip to content

Commit 5278a7c

Browse files
Format with black
Signed-off-by: Jacob Stopak <[email protected]>
1 parent 0463de8 commit 5278a7c

File tree

2 files changed

+27
-9
lines changed

2 files changed

+27
-9
lines changed

git_sim/git_sim_base_command.py

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,11 @@ def draw_commit(self, commit, i, prevCircle, shift=numpy.array([0.0, 0.0, 0.0]))
235235
commit_fill = m.RED
236236
else:
237237
commit_fill = m.GRAY
238-
238+
239239
circle = m.Circle(
240-
stroke_color=commit_fill, fill_color=commit_fill, fill_opacity=self.fill_opacity
240+
stroke_color=commit_fill,
241+
fill_color=commit_fill,
242+
fill_opacity=self.fill_opacity,
241243
)
242244
circle.height = 1
243245

@@ -320,14 +322,25 @@ def draw_commit(self, commit, i, prevCircle, shift=numpy.array([0.0, 0.0, 0.0]))
320322
self.play(
321323
self.camera.frame.animate.move_to(circle.get_center()),
322324
m.Create(circle),
323-
m.Text("") if settings.highlight_commit_messages else m.AddTextLetterByLetter(commitId),
325+
m.Text("")
326+
if settings.highlight_commit_messages
327+
else m.AddTextLetterByLetter(commitId),
324328
m.AddTextLetterByLetter(message),
325329
run_time=1 / settings.speed,
326330
)
327331
elif isNewCommit:
328-
self.add(circle, m.Text("") if settings.highlight_commit_messages else commitId, message)
332+
self.add(
333+
circle,
334+
m.Text("") if settings.highlight_commit_messages else commitId,
335+
message,
336+
)
329337
else:
330-
return m.Text("") if settings.highlight_commit_messages else commitId, circle, arrow, hide_refs
338+
return (
339+
m.Text("") if settings.highlight_commit_messages else commitId,
340+
circle,
341+
arrow,
342+
hide_refs,
343+
)
331344

332345
if commit != "dark":
333346
self.drawnCommits[commit.hexsha] = circle
@@ -369,7 +382,9 @@ def build_commit_id_and_message(self, commit, i):
369382

370383
def draw_head(self, commit, i, commitId):
371384
if commit.hexsha == self.repo.head.commit.hexsha:
372-
headbox = m.Rectangle(color=m.BLUE, fill_color=m.BLUE, fill_opacity=self.ref_fill_opacity)
385+
headbox = m.Rectangle(
386+
color=m.BLUE, fill_color=m.BLUE, fill_opacity=self.ref_fill_opacity
387+
)
373388
headbox.width = 1
374389
headbox.height = 0.4
375390
if settings.highlight_commit_messages:
@@ -960,7 +975,9 @@ def setup_and_draw_parent(
960975
draw_arrow=True,
961976
color=m.RED,
962977
):
963-
circle = m.Circle(stroke_color=color, fill_color=color, fill_opacity=self.ref_fill_opacity)
978+
circle = m.Circle(
979+
stroke_color=color, fill_color=color, fill_opacity=self.ref_fill_opacity
980+
)
964981
circle.height = 1
965982
circle.next_to(
966983
self.drawnCommits[child.hexsha],

git_sim/merge.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ def construct(self):
109109
self.color_by()
110110

111111
else:
112-
merge_result, new_dir = self.check_merge_conflict(self.repo.active_branch.name, self.branch)
112+
merge_result, new_dir = self.check_merge_conflict(
113+
self.repo.active_branch.name, self.branch
114+
)
113115
if merge_result:
114116
self.parse_commits(head_commit)
115117
self.recenter_frame()
@@ -151,7 +153,6 @@ def construct(self):
151153
# Delete the local clone
152154
shutil.rmtree(new_dir, onerror=self.del_rw)
153155

154-
155156
def check_merge_conflict(self, branch1, branch2):
156157
git_root = self.repo.git.rev_parse("--show-toplevel")
157158
repo_name = os.path.basename(self.repo.working_dir)

0 commit comments

Comments
 (0)