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

replace flake8 with ruff #77

Merged
merged 3 commits into from Dec 27, 2022
Merged

Conversation

zacharyburnett
Copy link
Collaborator

@zacharyburnett zacharyburnett commented Dec 19, 2022

ruff is currently in-development, aims for parity with flake8 and black, and also implements several additional rulesets and fixes such as pydocstyle, isort, and flake8-bandit. It also supports pyproject.toml in the [tool.ruff] table. We can use it without black, and port over the existing .flake8 configuration using flake8-to-ruff

ruff's supported rules: https://github.com/charliermarsh/ruff#supported-rules

@codecov
Copy link

codecov bot commented Dec 19, 2022

Codecov Report

Base: 0.00% // Head: 0.00% // No change to project coverage 👍

Coverage data is based on head (93e5995) compared to base (454314b).
Patch has no changes to coverable lines.

Additional details and impacted files
@@          Coverage Diff           @@
##           master     #77   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files          25      25           
  Lines        3060    3060           
======================================
  Misses       3060    3060           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@zacharyburnett
Copy link
Collaborator Author

zacharyburnett commented Dec 19, 2022

The installed dependencies would change from those required by flake8:

pipdeptree --packages flake8
flake8==6.0.0
  - mccabe [required: >=0.7.0,<0.8.0, installed: 0.7.0]
  - pycodestyle [required: >=2.10.0,<2.11.0, installed: 2.10.0]
  - pyflakes [required: >=3.0.0,<3.1.0, installed: 3.0.1]

to the ruff build:

pipdeptree --packages ruff
ruff==0.0.187

@zacharyburnett zacharyburnett marked this pull request as ready for review December 19, 2022 14:54
Copy link
Collaborator

@stscieisenhamer stscieisenhamer left a comment

Choose a reason for hiding this comment

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

Thought this morning: Can we leave the flake8 configuration? The CI can use ruff, but at least having the equivalent flake8 will not leave IDE's and other tools out.

@zacharyburnett
Copy link
Collaborator Author

Thought this morning: Can we leave the flake8 configuration? The CI can use ruff, but at least having the equivalent flake8 will not leave IDE's and other tools out.

Sure, we can

@zacharyburnett zacharyburnett merged commit 2a97636 into spacetelescope:master Dec 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog-entry-needed does not require an entry in `CHANGES.rst`
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants