Fix typing issues that appeared after latest mypy update by ashleysommer · Pull Request #2841 · RDFLib/rdflib (original) (raw)
The PR from dependabot to update to mypy v1.6.1 -> 1.8.0 was merged this afternoon
#2676
This caused some new mypy errors to appear. Nothing too hard to fix.
Particularly funny are the unused-ignore errors.
Its now an error to ignore an typing error where there is no typing error. I don't know if those original ignored typing errors are fixed in mypy v1.8.0, but the easiest fix is to add unused-ignore
to the ignored errors for the affected lines, effectively ignoring the error thats thrown by ignoring an error that is not an error.
The other new mypy errors were real, possibly from some updated lxml typing information that was added, but they can also be worked around by some selectively placed typing information and some more ignore statements.