lxml / lxml-stubs

Type stubs for the lxml package
Other
43 stars 29 forks source link

type definition for _ErrorLog missing #91

Open svniemeijer opened 1 year ago

svniemeijer commented 1 year ago

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]