-
Notifications
You must be signed in to change notification settings - Fork 38
Linting and formatting: add Ruff #1000
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
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.
although not too bad, it is quite a lot of files. I propose the following:
create a separate branch off main in which you do the github workflows, precommit and pyproject.toml changes
this branch should not contain any code changes.
instead, you can disable any violating rules in the pyproject.toml in the configuration
then rebase this branch off the other one
note: this may cause some merge/rebase conflicts but after merging, this branch in your local, rebased checkout should be completely the same as the one in the PR ( git diff origin/feature/add-ruff yields an empty diff)
all the configuration disablings in the pyproject.toml should now be "normal" again
then this change is split into 2 stages which helps people migrate, as well as prove that this is indeed the right way to go forward
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.
You need to change the recommended vscode extensions to ruff
.
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.
Nice to have ruff
now.
…a small adjustment Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
…power-grid-model into feature/add-ruff
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.
Only one minor additional thing left from me. There are still some pylint
comments at dataset_class_maps.py.jinja
. Remove those as well and don't forget to run the code generator afterwards. Besides that, it looks good to me and locally it is formatted the same as here.
please just add a |
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
Signed-off-by: Laurynas Jagutis <[email protected]>
|
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.
many previously disabled rules were removed because we don't have PL
checks enabled. Some of these may be re-added in a later PR, but for now, let's go ahead and merge
Adds Ruff linting and formatting, replaces the old linting and formatting tools.