-
Notifications
You must be signed in to change notification settings - Fork 14
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
some refactorings to reduce cyclomatic complexity #25
Conversation
Codecov Report
@@ Coverage Diff @@
## master #25 +/- ##
==========================================
+ Coverage 94.37% 94.55% +0.17%
==========================================
Files 5 5
Lines 249 257 +8
Branches 21 20 -1
==========================================
+ Hits 235 243 +8
Misses 12 12
Partials 2 2
Continue to review full report at Codecov.
|
return auth | ||
|
||
|
||
def execute_ddns_update(update_ddns, ip, hostname, auth, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This functions has too many parameters and still has some Cognitive Complexity.
49-51: Function `execute_ddns_update` has 9 arguments (exceeds 4 allowed). Consider refactoring. [structure]
49-73: Function `execute_ddns_update` has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. [structure]
Maybe try a different approach here.
} | ||
|
||
|
||
def process_generic(url, updater_options, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same issues of execute_ddns_update
function (line 49):
77-79: Function `process_generic` has 5 arguments (exceeds 4 allowed). Consider refactoring. [structure]
@jms, thanks for contributing! Running
|
yes, is no good yet, i'll try a different approach and I'll update this pull request. |
moved some code to functions to reduce the cyclomatic complexity #19