Reduce the complexity of other/scoring_algorithm.py#8045
Merged
dhruvmanila merged 7 commits intoTheAlgorithms:masterfrom Mar 2, 2023
Merged
Conversation
CaedenPH
reviewed
Dec 24, 2022
Contributor
CaedenPH
left a comment
There was a problem hiding this comment.
Maybe I am misunderstanding something, but why is the max complexity being increased?
Member
Author
It was decreased in #7954, but now there are algorithms with greater complexity. |
Member
Author
|
@cclauss please review |
dhruvmanila
requested changes
Mar 1, 2023
other/scoring_algorithm.py
Outdated
Comment on lines
108
to
113
Member
There was a problem hiding this comment.
Suggested change
| 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.
dhruvmanila
approved these changes
Mar 2, 2023
Cjkjvfnby
pushed a commit
to Cjkjvfnby/Python
that referenced
this pull request
Mar 13, 2023
* Increase the --max-complexity threshold in the file .flake8
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your change:
Reduce the complexity of other/scoring_algorithm.py from 16 to 10
Checklist:
Fixes: #{$ISSUE_NO}.