Skip to content

Commit

Permalink
Update mypy typing checking
Browse files Browse the repository at this point in the history
We’re already exempting the from arg-type so let’s just add var-annotated and revisit another time.
  • Loading branch information
robinwhittleton authored and acabal committed Jun 7, 2024
1 parent 384ba69 commit 7866219
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions se/se_epub.py
Original file line number Diff line number Diff line change
Expand Up @@ -1328,7 +1328,7 @@ def _check_endnotes(self) -> list:
anchor = href[hash_position:]
references.append(anchor) # keep these for later reverse check
# Now try to find anchor in endnotes
matches = list(filter(lambda x, old=anchor: x.anchor == old, self.endnotes)) # type: ignore [arg-type]
matches = list(filter(lambda x, old=anchor: x.anchor == old, self.endnotes)) # type: ignore [arg-type, var-annotated]
if not matches:
missing.append(anchor)
if len(matches) > 1:
Expand Down Expand Up @@ -1521,7 +1521,7 @@ def __process_noteref_link(self, change_list, current_note_number, file_name, li
link.lxml_element.text = str(current_note_number)
needs_rewrite = True
# Now try to find this in endnotes
matches = list(filter(lambda x, old=old_anchor: x.anchor == old, self.endnotes)) # type: ignore [arg-type]
matches = list(filter(lambda x, old=old_anchor: x.anchor == old, self.endnotes)) # type: ignore [arg-type, var-annotated]
if not matches:
raise se.InvalidInputException(f"Couldn’t find endnote with anchor [attr]{old_anchor}[/].")
if len(matches) > 1:
Expand Down

0 comments on commit 7866219

Please sign in to comment.