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

Moving from pylint to ruff linter #1296

Merged
merged 46 commits into from
Jun 16, 2023
Merged

Moving from pylint to ruff linter #1296

merged 46 commits into from
Jun 16, 2023

Conversation

john-science
Copy link
Member

Description

This PR moves the ARMI project from using the pylint linter to using the ruff linter.

That means that this PR is big, because we used to have # pylint: disable=xyz lines in like every Python file. But that's not necessary with ruff. Not only is ruff like 100x faster, it is easier to configure (see the top-level ruff.toml file I added).

Also, this PR fixes all ruff errors in the repo. This allows me to add a new GitHub Action just to run ruff on the code, like we do when we run black. This way we can prevent people from adding poorly formatted code to the repo.

Also, ruff has the MIT license, which is a big improvement over pylint.


Checklist

  • This PR has only one purpose or idea.
  • Tests have been added/updated to verify that the new/changed code works.
  • The release notes (location doc/release/0.X.rst) are up-to-date with any important changes.
  • The documentation is still up-to-date in the doc folder.
  • The dependencies are still up-to-date in setup.py.

@john-science john-science added the architecture Issues related to big picture system architecture label Jun 8, 2023
@john-science john-science requested a review from opotowsky June 8, 2023 22:22
@opotowsky
Copy link
Member

Every time you merge main in I feel a little guilt I haven't gotten to it yet. I know it's low priority, but I still expected to be done by now. I promise it's still on my radar, and should work nicely with my schedule in the coming couple of days

@opotowsky opotowsky mentioned this pull request Jun 14, 2023
7 tasks
@opotowsky
Copy link
Member

Ok I've started clicking view on files. Finally in progress!

Copy link
Member

@opotowsky opotowsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok this PR looks good! I've also testing things internally and nothing has changed.

Nice work yet again, @john-science

@john-science john-science merged commit df85f71 into main Jun 16, 2023
@john-science john-science deleted the move2ruff branch June 16, 2023 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
architecture Issues related to big picture system architecture
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants