-
Notifications
You must be signed in to change notification settings - Fork 3
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
More ruff rules #154
Merged
Merged
More ruff rules #154
Commits on Jul 15, 2023
-
Ruff has it's own custom set of linter rules, this enables all of them.
Configuration menu - View commit details
-
Copy full SHA for 92663be - Browse repository at this point
Copy the full SHA 92663beView commit details -
This enables all ruff's flake8-use-pathlib (PTH) extension rules.
Configuration menu - View commit details
-
Copy full SHA for 5d6910f - Browse repository at this point
Copy the full SHA 5d6910fView commit details -
This enables all ruff's flake8-async (ASYNC) rules.
Configuration menu - View commit details
-
Copy full SHA for 57a9769 - Browse repository at this point
Copy the full SHA 57a9769View commit details -
This enables all ruff's flake8-quotes (Q) rules.
Configuration menu - View commit details
-
Copy full SHA for 93719ba - Browse repository at this point
Copy the full SHA 93719baView commit details -
This enables all ruff's flake8-return (RET) rules.
Configuration menu - View commit details
-
Copy full SHA for ed2c9cb - Browse repository at this point
Copy the full SHA ed2c9cbView commit details -
This enables all ruff's pyupgrade (UP) rules. However UP024 (using errors that alias OSError) is ignored, as that prohibits use of exceptions like `IOError`, which is utilized pretty extensively in mcproto.
Configuration menu - View commit details
-
Copy full SHA for 8f76213 - Browse repository at this point
Copy the full SHA 8f76213View commit details -
This enables all ruff's pylint (PL) rules. However PLR2004 (using unnamed numerical constants) is ignored, as these kinds of constants are used all over the codebase, in comparisons, etc. As mcproto is a fairly low level library, this is not surprising, and in most cases, it's easy to understand what the numerical constant is in the context of that comparison.
Configuration menu - View commit details
-
Copy full SHA for 24503f5 - Browse repository at this point
Copy the full SHA 24503f5View commit details -
This enables all ruff's pygrep-hooks (PGH) rules. However PGH003 (using specific rule codes in type ignores) is ignored, as we're using pyright rather than mypy, and while there are some rulecodes for pyright and we could be more specific, most of the violations just fall under the same (general typing issues) category, which isn't very helpful for categorizing the issue. Because of that, this would just be annoying to do without any huge benefit for it.
Configuration menu - View commit details
-
Copy full SHA for 49261fc - Browse repository at this point
Copy the full SHA 49261fcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 89399c1 - Browse repository at this point
Copy the full SHA 89399c1View commit details
Commits on Jul 16, 2023
-
This enables all ruff's flake8-gettext (INT) rules.
Configuration menu - View commit details
-
Copy full SHA for 60b019d - Browse repository at this point
Copy the full SHA 60b019dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0b49d66 - Browse repository at this point
Copy the full SHA 0b49d66View commit details
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.