Skip to content

Conversation

@redmer
Copy link

@redmer redmer commented Oct 4, 2017

I've added a couple of iterators and iterator methods to lxml. Nevertheless, many methods from lxml are still missing, cf. #525.

Both python 3 test suits pass.


class ElementChildIterator(Iterator['_Element']):
class _ElementMatchIterator(Iterator['_Element']):
def __iter__(self) -> '_ElementMatchIterator': ...
Copy link
Member

Choose a reason for hiding this comment

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

All of these overridden __iter__/__next__ methods seem to be redundant. I think you can just write most of these classes like class _ElementMatchIterator(Iterator[_Element]): .... __iter__ and __next__ will be inherited correctly. In that case, leave no blank space between the classes.

@funkyfuture
Copy link

with #1664 the lxml stubs will be removed.

@JelleZijlstra
Copy link
Member

The lxml stubs are now gone. Feel free to submit this change to https://github.com/JelleZijlstra/lxml-stubs instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants