Update observed rules: add holiday removal support #1796
Merged
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.
Proposed change
This PR extends our
ObservedRule
class to support "move to None" cases. In other words it's a holiday removal (no holiday + no observance type of rule). I've got this idea while reviewing #1792, specifically from this comment. It'll be useful for makingIFEU
holiday calendar a bit cleaner.Let me know your thoughts on this when you get a chance.
P.S. I did my best to avoid naming the rule
???_TO_NONDAY
:)Type of change
Checklist
make pre-commit
, it didn't generate any changesmake test
, all tests passed locally