-
-
Notifications
You must be signed in to change notification settings - Fork 46.6k
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
Reduce the complexity of other/scoring_algorithm.py #8045
Reduce the complexity of other/scoring_algorithm.py #8045
Conversation
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.
Maybe I am misunderstanding something, but why is the max complexity being increased?
It was decreased in #7954, but now there are algorithms with greater complexity. |
@cclauss please review |
other/scoring_algorithm.py
Outdated
data_lists: list[list[float]] = get_data(source_data) | ||
|
||
score_lists: list[list[float]] = calculate_each_score(data_lists, weights) | ||
|
||
final_scores: list[float] = generate_final_scores(score_lists) | ||
|
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.
data_lists: list[list[float]] = get_data(source_data) | |
score_lists: list[list[float]] = calculate_each_score(data_lists, weights) | |
final_scores: list[float] = generate_final_scores(score_lists) | |
data_lists = get_data(source_data) | |
score_lists = calculate_each_score(data_lists, weights) | |
final_scores = generate_final_scores(score_lists) | |
There's no need to specify variable type hint as the functions are already annotated.
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.
Fixed
* Increase the --max-complexity threshold in the file .flake8
* Increase the --max-complexity threshold in the file .flake8
Describe your change:
Reduce the complexity of other/scoring_algorithm.py from 16 to 10
Checklist:
Fixes: #{$ISSUE_NO}
.