-
Notifications
You must be signed in to change notification settings - Fork 6
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
Update linter configuration, update code base. #22
Closed
ioannis-vm
wants to merge
56
commits into
NHERI-SimCenter:main
from
ioannis-vm:2024_10_rulesets_and_linting_configuration
Closed
Update linter configuration, update code base. #22
ioannis-vm
wants to merge
56
commits into
NHERI-SimCenter:main
from
ioannis-vm:2024_10_rulesets_and_linting_configuration
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
`ruff format`
All changes in this commit are the result of `ruff check --fix`
- variable name `id` shadows built-in `id`. - Renamed variable.
Unnecessary `dict` call (rewrite as a literal)
- too complex methods. - simply silenced warning for existing code.
- Missing docstring. - Silecned warning for existing code.
One-line docstrings should fit in one line.
"1 blank line required between summary line and description" This helps auto-generated documentation have a concise description and optionally an extended description. The concise description renders well in tables listing available methods.
"First line should end with a period"
"First line of docstring should be in imperative mood"
"Exception must not use an f-string literal, assign to variable first"
"Consider `f'{occupancy}.{source}.{data_type}'` instead of string join"
- "Function name `...` should be lowercase" - Silenced warnings for existing code.
- Argument name `DSH` should be lowercase. - Silenced warning for existing code.
- Variable `...` in function should be lowercase. - Silenced warning for existing code.
- `inplace=True` should be avoided; it has inconsistent behavior. - Silenced warning for existing code.
- Use `.to_numpy()` instead of `.values`. - Changes implemented.
- Avoid using the generic variable name `df` for DataFrames. - Ignored warning for existing code.
- "Use a list comprehension to create a transformed list." - Change implemented.
- "Use specific rule codes when using `noqa`". - `# noqa` without rule codes removed.
Issues: - Too many branches. - Too many statements. - Magic value used in comparison. All were just silenced for the existing code.
- Loop variables being modified. These operations are prone to bugs. - Silenced warnings for existing code.
- Recommended to use pathlib. - Silenced warnings for existing code.
- Missing explicit `return` at the end of function able to return non-`None` value. - Silenced warnings for existing code.
- Unnecessary assignment to `MSE` before `return` statement. - Change implemented.
Consider ``` [subDSH[:5], *subDSH[6:-1].split(',')] ``` instead of list concatenation. Change applied.
- "Use `key in dict` instead of `key in dict.keys()`" - Changes implemented.
- "`print` found" - Silenced warnings for existing code. - We might want to use the built-in logging module here in the future.
- "Missing author in TODO." - Assigned to myself.
"Missing colon in TODO"
- "Missing issue description." - Reformatted description.
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.
run_checks.sh
to run checks going forward.