This repository has been archived by the owner on Nov 15, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
configuration: Unified consistency checks
This commit refactors the consistency checks. Instead of each individual setter performs its checks locally, we delegate those checks to the already existing function `check_consistency`. This removes duplication and simplifies the logic. A motivating example of this one is the next PR in the stack that will introduce a check for a field, which validity depends on the validity of other two fields. Without this refactoring we will have to place a check not only to the field in question, but also to the other two fields so that if they are changed they do not violate consistency criteria. It's easy to imagine how this can go unwieldy with the number of checks.
- Loading branch information