Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Commit

Permalink
configuration: Unified consistency checks
Browse files Browse the repository at this point in the history
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
pepyakin committed Dec 22, 2021
1 parent 848aa04 commit 2a56742
Showing 1 changed file with 263 additions and 167 deletions.
Loading

0 comments on commit 2a56742

Please sign in to comment.