-
Notifications
You must be signed in to change notification settings - Fork 37
enable preview mode for ruff #243
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
Conversation
Oh actually I get new errors, because of the new rules I assume, in @@ -1,12 +1,10 @@
-# -*- coding: utf-8 -*-
- +import datetime
import os
import sys
-import datetime year_duration = (
- current_year
- if current_year == creation_year
- else creation_year + " - " + current_year
+ current_year if current_year == creation_year else creation_year + " - " + current_year
) New lines missing in the intersphinx_mapping = {
- "python": ("https://docs.python.org/3", None),"BusDevice": ("https://docs.circuitpython.org/projects/busdevice/en/latest/", None),
-
+ "python": ("https://docs.python.org/3", None),
+ "BusDevice": ("https://docs.circuitpython.org/projects/busdevice/en/latest/", None),
"CircuitPython": ("https://docs.circuitpython.org/en/latest/", None),
} Lines 35 to 44 in e1f081f
|
The hyphens in the opening / closing tags I believe this diff of the cookiecutter template file should make the resulting generated conf file acceptable to ruff. It inlcudes the changes you mentioned above as well as tweaks to these hyphens to fix the intersphinx_mapping list. Also a few other comments removed that it was flagging on. ruff_fixes.diff
I could PR this against your branch if it's easier to get the changes that way, let me know. |
Thanks, I think that works, committed it and tested it locally. |
[not saying this needs to be added to this PR:] we should make sure the resulting repo is pre-commit clean during CI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me.
I will address any remaining issues that prevent pre-commit from passing on a freshly generated project in #244
The following warnings appear when runnig pre-commit:
As mentioned in #240 these are a bunch of rules that were added in
extend-select
that don't do anything because they are only available in preview mode. Preview is a mode that enables additional rules meant to allow testing them before they are added (or not) to the main rules.If I understand correctly those rules come from converting from pylint, so I assume we want them actually enabled by enabling preview mode. Alternatively to this PR we can remove the rules.