5252def get_refs ():
5353 refs = {}
5454
55- for path in glob .glob (os .path .join (args .boilerplate_dir , "boilerplate.*.txt" )):
55+ for path in glob .glob (os .path .join (
56+ args .boilerplate_dir , "boilerplate.*.txt" )):
5657 extension = os .path .basename (path ).split ("." )[1 ]
5758
5859 ref_file = open (path , 'r' )
@@ -105,7 +106,7 @@ def file_passes(filename, refs, regexs):
105106 filename , file = verbose_out )
106107 return False
107108
108- # Replace all occurrences of the regex "2014|2015|2016|2017|2018" with "YEAR"
109+ # Replace all occurrences of regex "2014|2015|2016|2017|2018" with "YEAR"
109110 p = regexs ["date" ]
110111 for i , d in enumerate (data ):
111112 (data [i ], found ) = p .subn ('YEAR' , d )
@@ -118,7 +119,8 @@ def file_passes(filename, refs, regexs):
118119 filename , file = verbose_out )
119120 if args .verbose :
120121 print (file = verbose_out )
121- for line in difflib .unified_diff (ref , data , 'reference' , filename , lineterm = '' ):
122+ for line in difflib .unified_diff (
123+ ref , data , 'reference' , filename , lineterm = '' ):
122124 print (line , file = verbose_out )
123125 print (file = verbose_out )
124126 return False
@@ -171,9 +173,11 @@ def get_dates():
171173
172174def get_regexs ():
173175 regexs = {}
174- # Search for "YEAR" which exists in the boilerplate, but shouldn't in the real thing
176+ # Search for "YEAR" which exists in the boilerplate,
177+ # but shouldn't in the real thing
175178 regexs ["year" ] = re .compile ('YEAR' )
176- # get_dates return 2014, 2015, 2016, 2017, or 2018 until the current year as a regex like: "(2014|2015|2016|2017|2018)";
179+ # get_dates return 2014, 2015, 2016, 2017, or 2018 until the current year
180+ # as a regex like: "(2014|2015|2016|2017|2018)";
177181 # company holder names can be anything
178182 regexs ["date" ] = re .compile (get_dates ())
179183 # strip #!.* from shell scripts
0 commit comments