-
Notifications
You must be signed in to change notification settings - Fork 8
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
Update grammar.py to work with the latest pyparsing. #50
base: master
Are you sure you want to change the base?
Conversation
I'm new to pyparsing, but I believe that using I don't know how comprehensive the testing is in this repository. This may be a case where we need to get it into the hands of downstream consumers for validation. |
I'm also new to pyparsing, and after quickly reviewing the docs, I'd agree with @nick-knight's assessment here. It also looks like there are several warnings that can be turned on that should explicitly catch the way we were using Forward declarations previously:
Since I'm really not sure what the behavior of the previous code was, I'd also agree with Nick that we should do some testing on real DTS files. The |
Suggest merging main into this branch and see if it resolves the CI failures. (Still might want further testing before merging this branch into main.) |
I can rebase master, but from local testing I know that this will allow mypy checks to pass, but there are hundreds of other lint errors from pylint. |
I admit I don't understand how such a localized (and apparently syntactically valid) change could cause such widespread lint regression. |
It's not this change that causes the lint regression; it's the fact that we don't pin the linting tool version, and in the years since this codebase was last tested, the linting tool has added many new lint rules. |
Yeah this change doesn't cause any regression I know of, I just mean that there are many other lint failures besides the mypy failures that this fixes. |
Understood. And addressing these I think, for now, we should just leave this open to community contributions. For future reference, here is the
|
A few updates that allow this file to typecheck with mypy and the latest pyparsing:
<<=
to "assign" to a Forward declaration.