@@ -121,7 +121,7 @@ def get_input_text(config):
121121 return None , None
122122 extension = os .path .splitext (config ["input file" ])[1 ][1 :] # get file extention without .
123123 try :
124- with open (config ["input file" ], 'r' ) as myfile :
124+ with open (config ["input file" ]) as myfile :
125125 return myfile .read (), extension
126126 except UnicodeDecodeError :
127127 print ("can't read text" )
@@ -150,8 +150,8 @@ def colored(text, color):
150150 , Fore .LIGHTBLACK_EX ))
151151 print ()
152152
153- tick = colored (u "\u2713 " , Fore .LIGHTGREEN_EX ) + " "
154- cross = colored (u "\u2717 " , Fore .LIGHTRED_EX ) + " "
153+ tick = colored ("\u2713 " , Fore .LIGHTGREEN_EX ) + " "
154+ cross = colored ("\u2717 " , Fore .LIGHTRED_EX ) + " "
155155
156156 rule_explanations = []
157157
@@ -209,7 +209,7 @@ def colored(text, color):
209209 print (descr + ":" + " " * (col_len - len (descr )) + url )
210210 print ()
211211
212- print (colored ("Text checked by {url } ({version})" . format ( url = api_url , version = version ) , Fore .LIGHTBLACK_EX ))
212+ print (colored (f "Text checked by { api_url } ({ version } )" , Fore .LIGHTBLACK_EX ))
213213
214214
215215def main ():
@@ -219,7 +219,7 @@ def main():
219219 print (sys .version )
220220
221221 if config ['pwl' ]:
222- with open (config ['pwl' ], 'r' ) as fs :
222+ with open (config ['pwl' ]) as fs :
223223 config ['pwl' ] = [w .strip () for w in fs .readlines ()]
224224
225225 input_text , inputtype = get_input_text (config )
0 commit comments