Runs pyupgrade to Python 3.8+ and adds a hook for it

This commit is contained in:
Trenton Holmes
2022-05-06 09:04:08 -07:00
parent 7909b30b4b
commit 3003bdd507
34 changed files with 113 additions and 109 deletions

View File

@@ -98,7 +98,7 @@ class RasterisedDocumentParser(DocumentParser):
def extract_text(self, sidecar_file, pdf_file):
if sidecar_file and os.path.isfile(sidecar_file):
with open(sidecar_file, "r") as f:
with open(sidecar_file) as f:
text = f.read()
if "[OCR skipped on page" not in text: