-
Notifications
You must be signed in to change notification settings - Fork 10
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
Improving ruff setup #224
Improving ruff setup #224
Commits on Jun 26, 2024
-
Redefining ruff, starting with target-version = "py38"
Let's remove all rules so far, and re-introduce those by following the definitions of pylint. The first rule is target-version infered from the package definition that requires-python >= 3.8.
Configuration menu - View commit details
-
Copy full SHA for b3edb62 - Browse repository at this point
Copy the full SHA b3edb62View commit details -
Patterns defined at .python-lint lines 10 & 14.
Configuration menu - View commit details
-
Copy full SHA for 8c9f307 - Browse repository at this point
Copy the full SHA 8c9f307View commit details -
Disabling rules according to .python-lint
Current setup defined between lines 57-105.
Configuration menu - View commit details
-
Copy full SHA for 5db2b31 - Browse repository at this point
Copy the full SHA 5db2b31View commit details -
Defining `max-nested-blocks` as .pyhton-lint line 141.
Configuration menu - View commit details
-
Copy full SHA for e29073e - Browse repository at this point
Copy the full SHA e29073eView commit details -
Confirming with expected-line-ending-format
While pylint defines `expected-line-ending-format`, ruff uses `line-ending` instead. Defined in .python-lint line 254.
Configuration menu - View commit details
-
Copy full SHA for ece6552 - Browse repository at this point
Copy the full SHA ece6552View commit details -
Configuration menu - View commit details
-
Copy full SHA for ec2fa95 - Browse repository at this point
Copy the full SHA ec2fa95View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8024105 - Browse repository at this point
Copy the full SHA 8024105View commit details
Commits on Jun 27, 2024
-
multiple-statements-on-one-line-colon
Equivalent to single-line-if-stmt at line 278 of .python-lint
Configuration menu - View commit details
-
Copy full SHA for 47f0635 - Browse repository at this point
Copy the full SHA 47f0635View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7293026 - Browse repository at this point
Copy the full SHA 7293026View commit details -
In respect t ologging-modules, line 285 of .python-lint
We don't need that with ruff, but here is a placeholder if we want to add more than default `logger` in the future.
Configuration menu - View commit details
-
Copy full SHA for 5889784 - Browse repository at this point
Copy the full SHA 5889784View commit details -
Addressing "init-import=no" in line 402 from .python-lint
Configuration menu - View commit details
-
Copy full SHA for 2368874 - Browse repository at this point
Copy the full SHA 2368874View commit details -
Interestingly, max-args is defined as 5 in line 434, but PLR0913 rule is ignored.
Configuration menu - View commit details
-
Copy full SHA for f93b7b1 - Browse repository at this point
Copy the full SHA f93b7b1View commit details -
Defining DESIGN explicit setup
To reflect DESIGN section in .python-lint, pages 431-463.
Configuration menu - View commit details
-
Copy full SHA for 576763c - Browse repository at this point
Copy the full SHA 576763cView commit details -
Closest option of satisfy EXCEPTIONS
Ruff doesn't implement the exactly the same, but E722 is good enough if not even better.
Configuration menu - View commit details
-
Copy full SHA for 0316003 - Browse repository at this point
Copy the full SHA 0316003View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4f3c334 - Browse repository at this point
Copy the full SHA 4f3c334View commit details -
Re-introducing (Q) flake8-quotes rules
sup3r do not follow: - Q000 bad-quotes-inline-string - Q004 unnecessary-escaped-quote
Configuration menu - View commit details
-
Copy full SHA for 56f5c9d - Browse repository at this point
Copy the full SHA 56f5c9dView commit details -
Re-introducing (I) isort rules
sup3r do not follow I001: unsorted-imports.
Configuration menu - View commit details
-
Copy full SHA for bc06fad - Browse repository at this point
Copy the full SHA bc06fadView commit details -
Re-introducing (NPY) NymPy-specific rules
sup3r doesn't follow NPY002, but we might want to re-consider that in the future.
Configuration menu - View commit details
-
Copy full SHA for 2340702 - Browse repository at this point
Copy the full SHA 2340702View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3d482a3 - Browse repository at this point
Copy the full SHA 3d482a3View commit details -
Re-introducing (UP) pyupgrade rules
sup3r doesn't follow: - UP009: utf8-encoding-declaration - UP015: redundant-open-modes - UP032: f-string
Configuration menu - View commit details
-
Copy full SHA for 070d7b9 - Browse repository at this point
Copy the full SHA 070d7b9View commit details -
Re-introducing (A) flake8-builtins
sup3r doesn't conform with, but should reconsider that in the future: - A001: builtin-variable-shadowing - A002: builtin-argument-shadowing
Configuration menu - View commit details
-
Copy full SHA for 80b8ee2 - Browse repository at this point
Copy the full SHA 80b8ee2View commit details -
Re-introducing (ARG) flake8-unused-arguments rules
sup3r doesn't conform with: - ARG002: unused-method-argument - ARG003: unused-class-method-argument - ARG004: unused-static-method-argument - ARG005: unused-lambda-argument
Configuration menu - View commit details
-
Copy full SHA for ebfbc74 - Browse repository at this point
Copy the full SHA ebfbc74View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f921d6 - Browse repository at this point
Copy the full SHA 2f921d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for e319929 - Browse repository at this point
Copy the full SHA e319929View commit details -
Re-introducing (COM) flake8-commas rules
sup3r doesn't conform with: - COM812: missing-trailing-comma
Configuration menu - View commit details
-
Copy full SHA for 43c0dd3 - Browse repository at this point
Copy the full SHA 43c0dd3View commit details -
Introducing (N) pep8-naming rules
sup3r doesn't conform with: - N802: invalid-function-name - N803: invalid-argument-name - N806: non-lowercase-variable-in-function
Configuration menu - View commit details
-
Copy full SHA for 2454b47 - Browse repository at this point
Copy the full SHA 2454b47View commit details -
Introducing (D) pydocstyle rules
sup3r doesn't conform with: - D105: undocumented-magic-method - D200: fits-on-one-line - D202: no-blank-line-after-function - D204: one-blank-line-after-class - D205: blank-line-after-summary - D207: under-indentation - D209: new-line-after-last-paragraph - D400: ends-in-period - D401: non-imperative-mood - D404: docstring-starts-with-this
Configuration menu - View commit details
-
Copy full SHA for 6ac9622 - Browse repository at this point
Copy the full SHA 6ac9622View commit details -
sup3r doesn't conform with: - PLR2004: magic-value-comparison - PLW2901: redefined-loop-name
Configuration menu - View commit details
-
Copy full SHA for 92ed73d - Browse repository at this point
Copy the full SHA 92ed73dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e14a08d - Browse repository at this point
Copy the full SHA e14a08dView commit details -
Configuration menu - View commit details
-
Copy full SHA for c12f36f - Browse repository at this point
Copy the full SHA c12f36fView commit details -
Configuration menu - View commit details
-
Copy full SHA for ec3e916 - Browse repository at this point
Copy the full SHA ec3e916View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7234595 - Browse repository at this point
Copy the full SHA 7234595View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4390315 - Browse repository at this point
Copy the full SHA 4390315View commit details -
Configuration menu - View commit details
-
Copy full SHA for 12521db - Browse repository at this point
Copy the full SHA 12521dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for eadd1cb - Browse repository at this point
Copy the full SHA eadd1cbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2330df6 - Browse repository at this point
Copy the full SHA 2330df6View commit details -
Adding (C4) flake8-comprehensions
As suggested by @bnb32 sup3r doesn't conform with: - C408: unnecessary-collection-call - C414: unnecessary-double-cast-or-process
Configuration menu - View commit details
-
Copy full SHA for 163e63e - Browse repository at this point
Copy the full SHA 163e63eView commit details -
As suggested by @bnb32 Using max-complexity as previously defined for flake8 (lintesrs/.flake8) as equal to 12.
Configuration menu - View commit details
-
Copy full SHA for 57ff41c - Browse repository at this point
Copy the full SHA 57ff41cView commit details -
Adding convention (C) and flake8-logging (LOG)
@bnb32 any other rule that you would like to include?
1Configuration menu - View commit details
-
Copy full SHA for 2c4b4d5 - Browse repository at this point
Copy the full SHA 2c4b4d5View commit details -
validate all codebase with super-linter
There were some misterious situations where super-linter was not properly checking the code. Paul mentioned a setup that limits checks to the very last commit only. I expect that VALIDATE_ALL_CODEBASE should address that.
Configuration menu - View commit details
-
Copy full SHA for e1a08ec - Browse repository at this point
Copy the full SHA e1a08ecView commit details -
Adding (SIM) flake8-simplify rules
As suggested by @bnb32. sup3r doesn't conform with: - SIM108: if-else-block-instead-of-if-exp - SIM117: multiple-with-statements - SIM118: in-dict-keys - SIM211: if-expr-with-false-true
Configuration menu - View commit details
-
Copy full SHA for f860ff6 - Browse repository at this point
Copy the full SHA f860ff6View commit details -
As suggested by @bnb32 sup3r doesn't conform with: - PERF102: incorrect-dict-iterator - PERF203: try-except-in-loop - PERF401: manual-list-comprehension
Configuration menu - View commit details
-
Copy full SHA for 90a0af9 - Browse repository at this point
Copy the full SHA 90a0af9View commit details -
We don't need to run on the full code base anymore
With the pull_request trigger we don't need VALIDATE_ALL_CODEBASE set to true anymore. Otherwise it's running twice. Thanks @ppinchuk!
Configuration menu - View commit details
-
Copy full SHA for c843ae7 - Browse repository at this point
Copy the full SHA c843ae7View commit details -
clean: Removing implicit rules
While conforming with the legacy setup, I added a few explicit specific rules but in the final version didn't make sense anymore since those are now implicit. For instance, no need of "E701" is added "E".
Configuration menu - View commit details
-
Copy full SHA for 8180a82 - Browse repository at this point
Copy the full SHA 8180a82View commit details