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

Polymorphism on Finder.find #522

Merged
merged 1 commit into from
Feb 9, 2024

Conversation

ypconstante
Copy link
Contributor

Today Finder.find expects a list of html_node tuples, and returns an HTMLTree and a list of resulting HTMLNode.

To allow the changes for #515, we need to return html_nodes only when we don't need to later use the HTMLTree. If receiving an HTMLTree, Finder.find will return a list of HTMLNode, and if receiving a list of html_nodes the return will be a list of html_nodes.

For now we'll keep building an HTMLTree for the search, but this allow a future change to avoid building the HTMLTree on simple selectors without having to change modules using Finder.

This is a breaking change for projects using Finder.find directly.

@philss
Copy link
Owner

philss commented Jan 12, 2024

Hey @ypconstante , thanks for the PR once again! I will hold this for a bit, because I need to release a new version - a patch one. I know Finder is not public API, but just in case I will keep the out of the next version.

I will be back to review it soon :)

@philss philss merged commit f3569ac into philss:main Feb 9, 2024
9 checks passed
@ypconstante ypconstante deleted the finder-find-polymorphism branch February 17, 2024 16:43
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.

2 participants