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

🔧 Remove flake8 (replaced by ruff) #12163

Closed
wants to merge 2 commits into from

Conversation

chrisjsewell
Copy link
Member

Unless I am missing something, ruff now has full parity with flake8: https://docs.astral.sh/ruff/faq/#how-does-ruffs-linter-compare-to-flake8, and so there is no need to keep using it anymore?

Unless I am missing something, ruff now has full parity with flake8: https://docs.astral.sh/ruff/faq/#how-does-ruffs-linter-compare-to-flake8,
and so there is no need to use it anymore?
@picnixz
Copy link
Member

picnixz commented Mar 21, 2024

I don't know much about flake8 so I'll leave it to daniel.

@danieleades
Copy link
Contributor

not quite perfect parity yet, see astral-sh/ruff#2402

personally i'm in favour of doing it anyway, but this was recently rejected - #11902

Copy link
Contributor

@jayaddison jayaddison left a comment

Choose a reason for hiding this comment

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

Yep, this makes sense to me. Fewer CI compute resources spent (despite this being a relatively quick-running one), and we can always occasionally run flake8 locally, or even re-add it later, if there are any concerns.

I grepped for flake8 in the doc, utils, README.rst, CONTRIBUTING.rst -- and found no results.

@picnixz
Copy link
Member

picnixz commented Mar 22, 2024

So we are missing:

E122 ("continuation line missing indentation or outdented")
E124 ("closing bracket does not match visual indentation")
E125 ("continuation line with same indent as next logical line")
E127 ("continuation line over-indented for visual indent")
E128 ("continuation line under-indented for visual indent")
E129 ("visually indented line with same indent as next logical line")
E131 ("continuation line unaligned for hanging indent")

Nevertheless, I'm wondering if with ruff format we would automatically fix them. Thoughs @danieleades ?

@picnixz picnixz removed their request for review March 22, 2024 09:23
@danieleades
Copy link
Contributor

So we are missing:

E122 ("continuation line missing indentation or outdented")
E124 ("closing bracket does not match visual indentation")
E125 ("continuation line with same indent as next logical line")
E127 ("continuation line over-indented for visual indent")
E128 ("continuation line under-indented for visual indent")
E129 ("visually indented line with same indent as next logical line")
E131 ("continuation line unaligned for hanging indent")

Nevertheless, I'm wondering if with ruff format we would automatically fix them. Thoughs @danieleades ?

i would guess so, but i don't know for sure

@picnixz
Copy link
Member

picnixz commented Mar 22, 2024

@chrisjsewell I fixed your local conflict (but I forgot to ask you whether it's fine; if not, I won't do it in the future).

@chrisjsewell
Copy link
Member Author

but I forgot to ask you whether it's fine; if not, I won't do it in the future

no problem, thanks for mentioning 😄

@jayaddison jayaddison added dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels Mar 22, 2024
@AA-Turner
Copy link
Member

We can remove flake8 when Ruff implements the remaining rules, or we decide to adopt autoformatting. Neither is yet the case, so closing.

@AA-Turner AA-Turner closed this Apr 9, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants