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 bunch of metrics take a direction argument which can be one of the values {"in", "out", "both"}. There is a lot of duplicated logic that either checks the validity of these parameters or takes decisions based on one of the values. At the very least direction should be an enum to avoid these checks. It could possibly help to even promote it to a proper class so that other code doesn't need to take decisions on direction's behalf when the logic really belongs there.
The text was updated successfully, but these errors were encountered:
maxalbert
changed the title
Argument "direction" should be an enum (or a proper class)
Argument "direction" should be an enum, or a proper class
Feb 7, 2019
A bunch of metrics take a
direction
argument which can be one of the values{"in", "out", "both"}
. There is a lot of duplicated logic that either checks the validity of these parameters or takes decisions based on one of the values. At the very leastdirection
should be an enum to avoid these checks. It could possibly help to even promote it to a proper class so that other code doesn't need to take decisions ondirection
's behalf when the logic really belongs there.The text was updated successfully, but these errors were encountered: