-
-
Notifications
You must be signed in to change notification settings - Fork 410
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
Pylint alerts corrections as part of an intervention experiment 1500 #1501
Open
evidencebp
wants to merge
29
commits into
nschloe:main
Choose a base branch
from
evidencebp:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains 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
Function read_buffer had 56 branches while Pylint recommends having at most 12. Now there is a function process_line that uses more utility functions.
Function write had 69 statements while Pylint recommends having at most 50. Function read_buffer had 65 statements . Extracted functions to make the code more structured and solve that.
Function _read_faces had 54 statements while Pylint recommends having at most 50. Now there are dedicated functions _read_faces_ascii and _read_faces_binary
Function _write_buffer had 55 statements while Pylint recommends having at most 50. Extracted _write_cells to make the code more structured and solve that.
Function translate_cells had 52 statements while Pylint recommends having at most 50. Extracted _process_polygon_cells to make the code more structured and solve that.
Function split_f_z had 78 statements while Pylint recommends having at most 50. Extracted methods to make the code more structured and solve that.
Function read_buffer had 90 statements while Pylint recommends having at most 50. Extracted methods that handle the various names to make the code more structured and solve that.
Function write had 93 statements while Pylint recommends having at most 50. Function read had 54 statements. I extracted methods to make the code more structured and solve that.
Function read_buffer had 56 statements while Pylint recommends having at most 50. Function write had 64 statements. I extracted methods to make the code more structured and solve that.
Function _read_section had 53 statements while Pylint recommends having at most 50. I extracted _read_cell_offsets_and_connectivity to make the code more structured and solve that.
Function read_set excepted ValueError in line 218 and did raise immediately. This is equivalent to not catching yet more complex. I removed the exception handling.
Catching Exception might hide unexpected exceptions (e.g., due to new code that will be added). Function parse_articles catches Exception (line 12) The try section is __version__ = metadata.version("meshio") Exception was changed to metadata.PackageNotFoundError For details see https://docs.python.org/3/library/importlib.metadata.html
Function _write_entities had 6 nested-blocks while Pylint recommends having at most 5. I extracted _write_bounding_entities to make the code more structured and solve that.
Made long lines shorter
Made long line shorter
Made long line more readable
Made long lines shorter
Made long line shorter
This reverts commit 8faa817.
Function read_binary_buffer had 18 branches while Pylint recommends having at most 12. Function read_ascii_buffer had 24 branches. I extracted methods, aggregated similar code into a dicrtionary, and add the line checking to the while loop to make the code more structured and solve that.
Method __init__ (constructor) of class VtuReader had 39 branches while Pylint recommends having at most 12. Function write had 40 branches. Extracted many methods to make the code more structured and solve that.
Function read_buffer had 14 branches while Pylint recommends having at most 12. Extracted _merge_cell_tags_into_cell_data to make the code more structured and solve that.
Function read had 27 branches while Pylint recommends having at most 12. I extracted methods to make the code more structured and solve that. Function categorize had 14 branches. I extracted _lookup that is used three times there.
Function categorize had 13 branches while Pylint recommends having at most 12. Extracted _write_compressed to make the code more structured and solve that.
Function write had 15 branches while Pylint recommends having at most 12. Extracted _process_attr_refs and used it twice.
The constructor of class TimeSeriesReader had 16 branches while Pylint recommends having at most 12. I extracted find_grid_collection to make the code more structured and solve that. Method _read_data_item of class TimeSeriesReader had 13 branches while Pylint recommends having at most 12. Extracted _get_data_type_and_precision to make the code more structured and solve that.
Function _read_mesh had 13 branches while Pylint recommends having at most 12. I extracted _handle_vertices to make the code more structured and solve that.
Function _read_cells had 14 branches while Pylint recommends having at most 12. I extracted _identify_entity to make the code more structured and solve that.
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.
Makes the interventions describe in intervention issue.
The experiment is described here.
Each intervention was done in a dedicated commit with a message explaining it.