-
Notifications
You must be signed in to change notification settings - Fork 298
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
ENH: Sieve variable support #2514
Conversation
Wow, very neat again! @kamil-certat as you have a use-case of this feature, do you want to have a look at the diff? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love the change, as well as the refactoring and formatting against black/ruff. I have some NIT comments and one or two clarification questions, but also a one big one: what has happened to the test test_extra_dict
? Have you found it duplicated (if so, please remove test files and say what duplicates it)?
Please also update the bot documentation to describe variables as well as the changelog.
And as a discussion, I have two things I'm unsure, but I don't find it blocking:
- a variable can be in place of typed values, like
Bool
. Shouldn't we then ensure in code that the variable has the correct value? - variables look like extremely promising for the future, but I also ask myself - wouldn't it be also nice just allow syntax like
ifd.field1 = idf.field2
? The current use case looks like only supporting this. - I'd think about extending the validation - I haven't seen if there is any place where we would try to statically validate that the requested variable was previously defined
Accidentally discarded newer commits to the Sieve bot. I noticed it in the commit diff ~a week ago, but got distracted and forgot to address it...
This has actually been addressed in the code. The
At the moment, yes.
I'd expect |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the explanation! It sounds sufficient for me.
Before it gets merged, I'd ask you to verify / add a test that check()
would reject a sieve file with variable used without being declared beforehand
Merging this, based on @kamil-certat's positive review. For the last request on a check for undeclared variables, I opened #2526 |
This fixes issue #2486