1717def report_templating (
1818 action_in_present_continuous_tense , source_file , destination_file
1919):
20- print (
20+ do_print (
2121 MESSAGE_TEMPLATING .format (
2222 action_in_present_continuous_tense ,
2323 crayons .yellow (source_file ),
@@ -27,36 +27,36 @@ def report_templating(
2727
2828
2929def report_no_action ():
30- print (crayons .yellow (MESSAGE_NO_TEMPLATING , bold = True ))
30+ do_print (crayons .yellow (MESSAGE_NO_TEMPLATING , bold = True ))
3131
3232
3333def report_full_run (action_in_past_tense , file_count ):
3434 figure = crayons .green (str (file_count ), bold = True )
3535 message = MESSAGE_TEMPLATED_ALL .format (action_in_past_tense , figure )
36- print (_format_single (message , file_count ))
36+ do_print (_format_single (message , file_count ))
3737
3838
3939def report_partial_run (action_in_past_tense , file_count , total ):
4040 figure = crayons .green (str (file_count ), bold = True )
4141 total_figure = crayons .yellow (str (total ), bold = True )
4242 message = MESSAGE_REPORT .format (action_in_past_tense , figure , total_figure )
43- print (_format_single (message , total ))
43+ do_print (_format_single (message , total ))
4444
4545
4646def report_error_message (message ):
47- print (crayons .white ("Error: " , bold = True ) + crayons .red (message ))
47+ do_print (crayons .white ("Error: " , bold = True ) + crayons .red (message ))
4848
4949
5050def report_warning_message (message ):
51- print (crayons .white ("Warning: " , bold = True ) + crayons .yellow (message ))
51+ do_print (crayons .white ("Warning: " , bold = True ) + crayons .yellow (message ))
5252
5353
5454def report_info_message (message ):
55- print (crayons .white ("Info: " ) + crayons .green (message ))
55+ do_print (crayons .white ("Info: " ) + crayons .green (message ))
5656
5757
5858def report_up_to_date ():
59- print (crayons .green (MESSAGE_UP_TO_DATE , bold = True ))
59+ do_print (crayons .green (MESSAGE_UP_TO_DATE , bold = True ))
6060
6161
6262def convert_to_shell_exit_code (number_of_templated_files ):
@@ -69,12 +69,12 @@ def convert_to_shell_exit_code(number_of_templated_files):
6969
7070def report_git_pull (repo ):
7171 colored_repo = crayons .green (repo , bold = True )
72- print (MESSAGE_PULLING_REPO .format (colored_repo ))
72+ do_print (MESSAGE_PULLING_REPO .format (colored_repo ))
7373
7474
7575def report_git_clone (repo ):
7676 colored_repo = crayons .green (repo , bold = True )
77- print (MESSAGE_CLONING_REPO .format (colored_repo ))
77+ do_print (MESSAGE_CLONING_REPO .format (colored_repo ))
7878
7979
8080def report_template_not_in_moban_file (template ):
@@ -90,3 +90,7 @@ def _format_single(message, count):
9090
9191def report_file_extension_not_needed ():
9292 report_info_message (MESSAGE_FILE_EXTENSION_NOT_NEEDED )
93+
94+
95+ def do_print (message ):
96+ print (message )
0 commit comments