reactpy
reactpy copied to clipboard
Move `reactpy.backend.hooks` module into `reactpy.core.hooks`
Description
Fixes #1182 - Moves the hooks in reactpy.backend.hooks into reactpy.core.hooks
Checklist
Please update this checklist as you complete each item:
- [X] Tests have been developed for bug fixes or new functionality.
- [X] The changelog has been updated, if necessary.
- [X] Documentation has been updated, if necessary.
- [X] GitHub Issues closed by this PR have been linked.
By submitting this pull request I agree that all contributions comply with this project's open source license(s).
I'm having trouble with adding the # nocov comment at the top of backend.hooks. It seems to only be working on the first import line instead of the whole file.
Hmm I thought there was a way to do it for the whole file. Worst case you could add that comment to each individual hook in the file.
I decided to add nocov comments to every import/function. Let me know if there's a more concise way to do it, because I couldn't figure it out.
Still not passing lint:
reactpy/core/hooks.py:504: error: Incompatible return value type (got "Sequence[Any] | EllipsisType | None", expected "Sequence[Any] | None") [return-value]****
EDIT: Might be unrelated to your changes? If so, you can pin mypy to the previous version that doesn't break tests.
Why do you mean by pin mypy?
I don't see how my changes could have caused the lint error we're seeing, so I think I'm good to add mypy to the most recent version that doesn't break tests (once I know how to do that).