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

Increase code quality and reduce McCabe complexity by improving maintenance #151

Open
cmagnobarbosa opened this issue Jan 21, 2021 · 0 comments
Assignees

Comments

@cmagnobarbosa
Copy link
Member

cmagnobarbosa commented Jan 21, 2021

Today the topology NApp has a code quality below 7 (Scrutinizer 6.8) and some methods have McCabe complexity above 10, to improve maintenance it is necessary to change this.

McCabe's complexity above 8 (obtained using https://github.com/PyCQA/mccabe):

144:4: 'Main._restore_switch' 13
339:4: 'Main.enable_interface' 9
369:4: 'Main.disable_interface' 9
834:4: 'Main.update_instance_metadata' 8

Suggested changes:

  • Increase code quality to over 7.
  • Reduce McCabe complexity to below 10.
    • Refactor the _restore_switch method

References:

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

1 participant