Skip to content
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

style: Enable checking for pep8-naming (N) rules with ruff, fix N804, N805 and N813 #4556

Merged

Conversation

echoix
Copy link
Member

@echoix echoix commented Oct 20, 2024

This PR initially wanted to enable and fix N804, but some similar issues could be solved at once.

So, this PR enables pep8-naming (N) rules with ruff.

Rules already respected:

  • dunder-function-name (N807)
  • constant-imported-as-non-constant (N811)
  • camelcase-imported-as-acronym (N817)

Fixed rules:

Rules already respected:
- dunder-function-name (N807)
- constant-imported-as-non-constant (N811)
- camelcase-imported-as-acronym (N817)
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.
@echoix echoix requested a review from ninsbl October 20, 2024 13:34
@github-actions github-actions bot added GUI wxGUI related vector Related to vector data processing raster Related to raster data processing Python Related code is in Python libraries module tests Related to Test Suite labels Oct 20, 2024
@echoix echoix merged commit 7fbaa7e into OSGeo:main Oct 20, 2024
26 checks passed
@echoix echoix deleted the fix-N804-invalid-first-argument-name-for-class-method branch October 20, 2024 14:52
@github-actions github-actions bot added this to the 8.5.0 milestone Oct 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GUI wxGUI related libraries module Python Related code is in Python raster Related to raster data processing tests Related to Test Suite vector Related to vector data processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants