@@ -89,7 +89,7 @@ class TesseractNotFoundError(EnvironmentError):
89
89
def __init__ (self ):
90
90
super ().__init__ (
91
91
f"{ tesseract_cmd } is not installed or it's not in your PATH."
92
- + ' See README file for more information.' ,
92
+ f ' See README file for more information.' ,
93
93
)
94
94
95
95
@@ -158,7 +158,7 @@ def get_errors(error_string):
158
158
159
159
def cleanup (temp_name ):
160
160
"""Tries to remove temp files by filename wildcard path."""
161
- for filename in iglob (temp_name + ' *' if temp_name else temp_name ):
161
+ for filename in iglob (f' { temp_name } *' if temp_name else temp_name ):
162
162
try :
163
163
remove (filename )
164
164
except OSError as e :
@@ -195,7 +195,7 @@ def save(image):
195
195
yield f .name , realpath (normpath (normcase (image )))
196
196
return
197
197
image , extension = prepare (image )
198
- input_file_name = f .name + extsep + extension
198
+ input_file_name = f' { f .name } _input { extsep } { extension } '
199
199
image .save (input_file_name , format = image .format )
200
200
yield f .name , input_file_name
201
201
finally :
@@ -286,7 +286,7 @@ def run_and_get_output(
286
286
}
287
287
288
288
run_tesseract (** kwargs )
289
- filename = kwargs ['output_filename_base' ] + extsep + extension
289
+ filename = f" { kwargs ['output_filename_base' ]} { extsep } { extension } "
290
290
with open (filename , 'rb' ) as output_file :
291
291
if return_bytes :
292
292
return output_file .read ()
0 commit comments