forked from OSGeo/grass
-
Notifications
You must be signed in to change notification settings - Fork 0
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
E266 & E271 #19
Merged
Merged
E266 & E271 #19
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
… N805 and N813 (#4556) * style: Enable checking for pep8-naming (N) rules with Ruff Rules already respected: - dunder-function-name (N807) - constant-imported-as-non-constant (N811) - camelcase-imported-as-acronym (N817) * style: Fix invalid-first-argument-name-for-class-method (N804) Ruff rule: https://docs.astral.sh/ruff/rules/invalid-first-argument-name-for-class-method/ Two files had class methods that didn't use cls as their first argument * style: Fix camelcase-imported-as-lowercase (N813) Ruff rule: https://docs.astral.sh/ruff/rules/camelcase-imported-as-lowercase/ One instance only in a pytest file * style: Fix invalid-first-argument-name-for-method (N805) Ruff rule: https://docs.astral.sh/ruff/rules/invalid-first-argument-name-for-method/ Three instances in gui/wxpython/mapswipe/frame.py were ignored, as an inner class is defined using self2 and also references self from the containing class.
Ruff rule: https://docs.astral.sh/ruff/rules/if-else-block-instead-of-dict-get/ Python docs: https://docs.python.org/3/library/stdtypes.html#dict.get The get method never raises a KeyError.
…le issues (#4560) * style: Fix missing-whitespace (E231) * style: Fix mixed-spaces-and-tabs (E101) Ruff rule: https://docs.astral.sh/ruff/rules/mixed-spaces-and-tabs/ * style: Enable checking for E ruff rules from pycodestyle * style: Fix multiple-leading-hashes-for-block-comment (E266) Ruff rule: https://docs.astral.sh/ruff/rules/multiple-leading-hashes-for-block-comment/ For gui/wxpython/psmap/frame.py, the commented code was present since it was moved from addons to the main repo 13 years ago. At the time, both pair of lines had the same indentation, before PEP8 only formatted the second lines. File temporal/t.rast.what/t.rast.what.py is ignored for E265 and E266, as it is being addressed in #4550
Ruff rule: https://docs.astral.sh/ruff/rules/if-else-block-instead-of-if-exp Since the amount of changes for SIM108 are quite large, (more than 330), I've decided to split the fixes in more than 1 PR. I kept `scripts/*`, `python/*` and `gui/*` in other PRs. To avoid conflicts, I didn't commit the modified `pyproject.toml`, nor extra typing annotations that I used to help guiding and validating these fixes. * style: Fix if-else-block-instead-of-if-exp (SIM108) in utils/ * style: Fix if-else-block-instead-of-if-exp (SIM108) in lib/init/grass.py * style: Fix if-else-block-instead-of-if-exp (SIM108) in doc/ * style: Fix if-else-block-instead-of-if-exp (SIM108) in man/build_html.py * style: Fix if-else-block-instead-of-if-exp (SIM108) in temporal/ * style: Manual fixes of if-else-block-instead-of-if-exp (SIM108) in temporal/
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.
docs: Fixed E721 in gunittest/ (https://github.com/OSGeo/grass/pull/4549[)](https://github.com/a0x8o/grass/commit/5cff700eb5bcaa9adcba7cb67c790d16407acaf1)
wxGUI: Fixed E266 in nviz/ (https://github.com/OSGeo/grass/pull/4547[)](https://github.com/a0x8o/grass/commit/2a0ad5f1057ad66f716f044bc13bc4d6a7be5d95)
CI(deps): Update ubuntu:22.04 Docker digest to 0e5e4a5 (https://github.com/OSGeo/grass/pull/4553[)](https://github.com/a0x8o/grass/commit/1a803b41615713e89d4b531e204ee76e22318255)
renovate[bot] authored yesterday