chore: Remove redundant cast
Some checks failed
ci/woodpecker/push/lint Pipeline was successful
ci/woodpecker/push/static_analysis Pipeline failed
ci/woodpecker/push/test Pipeline failed

This commit is contained in:
Marty Oehme 2024-11-30 21:47:38 +01:00
parent ddaa75f44b
commit 7a69bd509f
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A
2 changed files with 3 additions and 2 deletions

View file

@ -41,7 +41,9 @@ def start(
try: try:
annotations.extend(extractor.run(fname)) annotations.extend(extractor.run(fname))
except ExtractionError as e: except ExtractionError as e:
logger.error(f"File extraction errors for {file}. File may be damaged.\n{e}") logger.error(
f"File extraction errors for {file}. File may be damaged.\n{e}"
)
if not file_available: if not file_available:
return None return None

View file

@ -35,7 +35,6 @@ class PdfExtractor:
for ( for (
page page
) in doc: # pyright: ignore [reportUnknownVariableType] - missing stub ) in doc: # pyright: ignore [reportUnknownVariableType] - missing stub
page = cast(mu.Page, page)
annot: mu.Annot annot: mu.Annot
for annot in page.annots(): for annot in page.annots():
quote, note = self._retrieve_annotation_content(page, annot) quote, note = self._retrieve_annotation_content(page, annot)