@@ -72,7 +72,7 @@ def __init__(self):
7272 self .arrow_stroke_width = 10
7373 self .arrow_tip_shape = m .StealthTip
7474 self .font_weight = m .BOLD
75-
75+
7676 def init_repo (self ):
7777 try :
7878 self .repo = Repo (search_parent_directories = True )
@@ -292,7 +292,14 @@ def draw_commit(self, commit, i, prevCircle, shift=numpy.array([0.0, 0.0, 0.0]))
292292 )
293293 end = self .drawnCommits [commit .hexsha ].get_center ()
294294
295- arrow = m .Arrow (start , end , color = self .fontColor , stroke_width = self .arrow_stroke_width , tip_shape = self .arrow_tip_shape , max_stroke_width_to_length_ratio = 1000 )
295+ arrow = m .Arrow (
296+ start ,
297+ end ,
298+ color = self .fontColor ,
299+ stroke_width = self .arrow_stroke_width ,
300+ tip_shape = self .arrow_tip_shape ,
301+ max_stroke_width_to_length_ratio = 1000 ,
302+ )
296303
297304 if commit == "dark" :
298305 arrow = m .Arrow (
@@ -311,7 +318,13 @@ def draw_commit(self, commit, i, prevCircle, shift=numpy.array([0.0, 0.0, 0.0]))
311318 for commitCircle in self .drawnCommits .values ():
312319 inter = m .Intersection (lineRect , commitCircle )
313320 if inter .has_points ():
314- arrow = m .CurvedArrow (start , end , color = self .fontColor , stroke_width = self .arrow_stroke_width , tip_shape = self .arrow_tip_shape )
321+ arrow = m .CurvedArrow (
322+ start ,
323+ end ,
324+ color = self .fontColor ,
325+ stroke_width = self .arrow_stroke_width ,
326+ tip_shape = self .arrow_tip_shape ,
327+ )
315328 if start [1 ] == end [1 ]:
316329 arrow .shift (m .UP * 1.25 )
317330 if start [0 ] < end [0 ] and start [1 ] == end [1 ]:
@@ -332,7 +345,10 @@ def draw_commit(self, commit, i, prevCircle, shift=numpy.array([0.0, 0.0, 0.0]))
332345 font = "Monospace" ,
333346 font_size = 20 if settings .highlight_commit_messages else 14 ,
334347 color = self .fontColor ,
335- weight = m .BOLD if settings .highlight_commit_messages or settings .style == StyleOptions .THICK else m .NORMAL ,
348+ weight = m .BOLD
349+ if settings .highlight_commit_messages
350+ or settings .style == StyleOptions .THICK
351+ else m .NORMAL ,
336352 ).next_to (circle , m .DOWN )
337353
338354 if settings .animate and commit != "dark" and isNewCommit :
@@ -385,7 +401,13 @@ def get_nonparent_branch_names(self):
385401 def build_commit_id_and_message (self , commit , i ):
386402 hide_refs = False
387403 if commit == "dark" :
388- commitId = m .Text ("" , font = "Monospace" , font_size = 20 , color = self .fontColor , weight = self .font_weight )
404+ commitId = m .Text (
405+ "" ,
406+ font = "Monospace" ,
407+ font_size = 20 ,
408+ color = self .fontColor ,
409+ weight = self .font_weight ,
410+ )
389411 commitMessage = ""
390412 else :
391413 commitId = m .Text (
@@ -410,7 +432,11 @@ def draw_head(self, commit, i, commitId):
410432 else :
411433 headbox .next_to (commitId , m .UP )
412434 headText = m .Text (
413- "HEAD" , font = "Monospace" , font_size = 20 , color = self .fontColor , weight = self .font_weight ,
435+ "HEAD" ,
436+ font = "Monospace" ,
437+ font_size = 20 ,
438+ color = self .fontColor ,
439+ weight = self .font_weight ,
414440 ).move_to (headbox .get_center ())
415441
416442 head = m .VGroup (headbox , headText )
@@ -457,7 +483,11 @@ def draw_branch(self, commit, i, make_branches_remote=False):
457483 )
458484
459485 branchText = m .Text (
460- text , font = "Monospace" , font_size = 20 , color = self .fontColor , weight = self .font_weight ,
486+ text ,
487+ font = "Monospace" ,
488+ font_size = 20 ,
489+ color = self .fontColor ,
490+ weight = self .font_weight ,
461491 )
462492 branchRec = m .Rectangle (
463493 color = m .GREEN ,
@@ -1002,7 +1032,10 @@ def setup_and_draw_parent(
10021032 color = m .RED ,
10031033 ):
10041034 circle = m .Circle (
1005- stroke_color = color , stroke_width = self .commit_stroke_width , fill_color = color , fill_opacity = self .ref_fill_opacity
1035+ stroke_color = color ,
1036+ stroke_width = self .commit_stroke_width ,
1037+ fill_color = color ,
1038+ fill_opacity = self .ref_fill_opacity ,
10061039 )
10071040 circle .height = 1
10081041 circle .next_to (
@@ -1014,12 +1047,23 @@ def setup_and_draw_parent(
10141047
10151048 start = circle .get_center ()
10161049 end = self .drawnCommits [child .hexsha ].get_center ()
1017- arrow = m .Arrow (start , end , color = self .fontColor , stroke_width = self .arrow_stroke_width , tip_shape = self .arrow_tip_shape , max_stroke_width_to_length_ratio = 1000 )
1050+ arrow = m .Arrow (
1051+ start ,
1052+ end ,
1053+ color = self .fontColor ,
1054+ stroke_width = self .arrow_stroke_width ,
1055+ tip_shape = self .arrow_tip_shape ,
1056+ max_stroke_width_to_length_ratio = 1000 ,
1057+ )
10181058 length = numpy .linalg .norm (start - end ) - (1.5 if start [1 ] == end [1 ] else 3 )
10191059 arrow .set_length (length )
10201060
10211061 commitId = m .Text (
1022- "abcdef" , font = "Monospace" , font_size = 20 , color = self .fontColor , weight = self .font_weight ,
1062+ "abcdef" ,
1063+ font = "Monospace" ,
1064+ font_size = 20 ,
1065+ color = self .fontColor ,
1066+ weight = self .font_weight ,
10231067 ).next_to (circle , m .UP )
10241068 self .toFadeOut .add (commitId )
10251069
@@ -1079,7 +1123,13 @@ def get_nondark_commits(self):
10791123 return nondark_commits
10801124
10811125 def draw_ref (self , commit , top , i = 0 , text = "HEAD" , color = m .BLUE ):
1082- refText = m .Text (text , font = "Monospace" , font_size = 20 , color = self .fontColor , weight = self .font_weight )
1126+ refText = m .Text (
1127+ text ,
1128+ font = "Monospace" ,
1129+ font_size = 20 ,
1130+ color = self .fontColor ,
1131+ weight = self .font_weight ,
1132+ )
10831133 refbox = m .Rectangle (
10841134 color = color ,
10851135 fill_color = color ,
0 commit comments