Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix _ErrorLog not iterable #100

Merged
merged 2 commits into from
Jun 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion lxml-stubs/etree.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,12 @@ def tostring(
inclusive_ns_prefixes: Any = ...,
) -> _AnyStr: ...

class _ErrorLog: ...
class _LogEntry:
path: Optional[str]
nsoranzo marked this conversation as resolved.
Show resolved Hide resolved

class _ErrorLog:
def __iter__(self) -> Iterator["_LogEntry"]: ...
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's actually not _ErrorLog that's iterable but its base class. Also, again, there are lots of public attributes and methods missing here. It's best to add all of them.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I think I've added all the public attributes/properties/methods listed at https://lxml.de/apidoc/lxml.etree.html for _LogEntry, _ErrorLog and its parent classes. Let me know if I've missed some.


class Error(Exception): ...

class LxmlError(Error):
Expand Down
Loading