-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Enable PYI033 for .py files #4166
Enable PYI033 for .py files #4166
Conversation
JonathanPlasse
commented
Apr 30, 2023
- Asked in Implement pygrep-hooks #980 (comment)
PR Check ResultsEcosystem✅ ecosystem check detected no changes. BenchmarkLinux
Windows
|
I'd been hesitant to enable these rules for |
No flake8-pyi rules are activated on .py files. |
Here is the list. |
We've discussed several times at flake8-pyi whether we wanted to support running our checks on The main reason we don't want to support I'm not too familiar with ruff's codebase (and don't know rust 😆), but my impression is that neither of these concerns apply to ruff in the same way. (You obviously have a... much broader scope than flake8-pyi :) If I were writing flake8-pyi from scratch today, I'd probably separate it into two plugins -- one which specialised in type hints (and could be run on |
831ceb8
to
787a2f8
Compare
787a2f8
to
422e8d0
Compare
Should we go ahead and merge this or do we want to activate all rules that can apply to |
IMO a Issue tracking all the rules that should be enabled in Then each PR takes it as one rule at a time, which can then be crossed of from the Issue when merged. |
422e8d0
to
b4478c6
Compare
What is blocking this PR? |
I think there are two things:
|
Is it possible to get the corresponding statement or expression from a |
We could do a binary search over the tree (at least after my changes to RustPython merge that include the decorators in the function range) but I would discourage from doing it in general. What are you trying to do? |
|
Closing for now, as I want to do this in a consolidated pass for all rules. |