lxml-stubs
lxml-stubs copied to clipboard
type definition for _ErrorLog missing
I am using an error reporting approach similar to Example #1 on this page:
except etree.DocumentInvalid as exc:
for error in exc.error_log:
logger.error(f"{error.filename}:{error.line}: {error.message}")
However, this gives:
error: "_ErrorLog" has no attribute "__iter__" (not iterable) [attr-defined]