Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Argument "direction" should be an enum, or a proper class #357

Closed
maxalbert opened this issue Feb 7, 2019 · 0 comments · Fixed by #2063
Closed

Argument "direction" should be an enum, or a proper class #357

maxalbert opened this issue Feb 7, 2019 · 0 comments · Fixed by #2063
Labels
FlowMachine Issues related to FlowMachine refactoring

Comments

@maxalbert
Copy link
Contributor

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.

@maxalbert maxalbert added FlowMachine Issues related to FlowMachine refactoring labels Feb 7, 2019
@maxalbert maxalbert mentioned this issue Feb 7, 2019
8 tasks
@maxalbert 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
@greenape greenape mentioned this issue Mar 4, 2020
8 tasks
@mergify mergify bot closed this as completed in #2063 Mar 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FlowMachine Issues related to FlowMachine refactoring
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant