You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A lot of static methods are used in ValuesOfCorrectType, but when I take a closer look I can't see why. There seems to be no added benefit in having these static. Would it be possible to remove all the static usage from this class?
The reason I ask is because I want to extend it in order to change the way some error messages are created. This feels related to #711, but I want to do more than a simple string replacement.
The text was updated successfully, but these errors were encountered:
So the only reason they are static is because of tests?
I just named one reason, there may be many.
Another one I can think of right now is that static methods are generally easier to reason about; one does (generally) not have to worry about state with them.
Then replacing self with static would also work for my case.
Yes. Accepting PRs, but preferrably one that opens up all validation rules for extensibility to ensure consistency.
A lot of
static
methods are used inValuesOfCorrectType
, but when I take a closer look I can't see why. There seems to be no added benefit in having these static. Would it be possible to remove all thestatic
usage from this class?The reason I ask is because I want to extend it in order to change the way some error messages are created. This feels related to #711, but I want to do more than a simple string replacement.
The text was updated successfully, but these errors were encountered: