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

[JTC] This set of cascading if-s should be refactored into something more readable. #326

Open
bmagyar opened this issue Apr 8, 2022 · 1 comment

Comments

@bmagyar
Copy link
Member

bmagyar commented Apr 8, 2022

This set of cascading if-s should be refactored into something more readable.
I suggest 2 things:

  • make the selection of choosing the command somehow more explicit with different variable names, etc: tmp_command_ is not very intuitive
  • refactor all the assign_interface_from_point uses into a function that gets a parameter, the command (whether it's desired state or the pid command)

Originally posted by @bmagyar in #225 (comment)

@christophfroehlich
Copy link
Contributor

Investigate how to refactor these cascading ifs so that it is easier to read which conditions together lead to a failure.
This section of the code looks like a table of booleans where in some cases an error is flagged up.

Originally posted by @bmagyar in #225 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants