Make use of forward_declaration from Parsy 1.4 for cleanup #142
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I'm the maintainer of Parsy (although not the original author) and I came across curlylint - I think it is one of the most advanced uses of Parsy I've found! Anyway, I happened to see this bit of code that can be cleaned up a bit with a feature from 1.4 - https://parsy.readthedocs.io/en/latest/ref/primitives.html#parsy.forward_declaration
This PR also loosens the dependency from
==
to>=
, which might more friendly for users in some situations, although I can also see you might want to pin it for your use case. FWIW, as the maintainer I'm very conservative with breaking changes for this library. In version 2.0 I dropped support for Python < 3.6, other than that it's very rare I break anything deliberately.Also, if you wanted, I could include testing against curlylint's test suite for regression testing, as part of Parsy's own test suite - it might help both projects.
There's a linting failure, but it's happening on
main
as well.