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

Upgrade ruff, remove black #7233

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open

Upgrade ruff, remove black #7233

wants to merge 3 commits into from

Conversation

legoktm
Copy link
Member

@legoktm legoktm commented Sep 19, 2024

Status

Ready for review

Description of Changes

This is split into three commits for ease of review:

Upgrade ruff, remove black

Upgrade ruff to the latest version so we can use it for formatting and
native editor integration. While we're at it, introduce the standard
make fix target
(freedomofpress/securedrop-tooling#11).

Actually fixing new issues will happen in follow-ups to make this change
easier to review.

Fixes #7226.

Apply ruff format .

This is all automated except test_manage.py was manually fixed to remove
extraneous commas that ruff tried to turn into tuples.

Fix most errors spotted by ruff

About half of these fixes were automatic, the rest I did by hand.

I skipped removing % formatting from pretty_bad_protocol since there
were like a hundred of them and it wasn't really worth it.

Testing

How should the reviewer test this PR?

  • CI passes
  • visual review

Deployment

Any special considerations for deployment? n/a

Checklist

  • Linting (make lint) and tests (make test) pass in the development container
  • Linting and tests (make -C admin test) pass in the admin development container

@legoktm legoktm requested a review from a team as a code owner September 19, 2024 22:05
@legoktm
Copy link
Member Author

legoktm commented Sep 19, 2024

CI seems busted right now, so I'll retrigger the jobs tomorrow.

Upgrade ruff to the latest version so we can use it for formatting and
native editor integration. While we're at it, introduce the standard
`make fix` target
(<freedomofpress/securedrop-tooling#11>).

We can remove `--show-source` too now that it's the default.

Actually fixing new issues will happen in follow-ups to make this change
easier to review.

Fixes #7226.
This is all automated except test_manage.py was manually fixed to remove
extraneous commas that ruff tried to turn into tuples.
About half of these fixes were automatic, the rest I did by hand.

I skipped removing % formatting from pretty_bad_protocol since there
were like a hundred of them and it wasn't really worth it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

Upgrade to ruff >=0.3.5
1 participant