-
-
Notifications
You must be signed in to change notification settings - Fork 403
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
Additional flake8 plugins we'd like to use #1765
Comments
I tend to completely ignore the "unused argument" warning in my code: sometimes, you need that argument in your interface, but not every implementation will need it, or even maybe most of them won't. It's OK, it's part of the life of an interface and its implementations. I think there are better way to improve the code quality than checking that, and adding My suggestion: we are all done for 7.1 as far as I'm concerned. |
I still have a WIP branch for flake8-docstrings, and I don't intend to ship 7.1 without finishing it. Unused args, fine, that decision can wait until after 7.1 and we check how many |
aaaaaaaaaaaaa |
I did self-assign this issue… But if you're considerably further along than mine (and I'm sure you are), don't worry about it. Especially now that I know someone else is working on it, I'm not gonna go finish mine and open a PR to snipe you. |
I'm looking at your branch @half-duplex and I really don't like this syntax:
I don't see the need for that change. Also, I don't see the point of adding short docstring just for the sake of having a docstring. |
Also, if you want to flag stuffs without docstring: use pylint. |
I wasn't going to break
Options: Disable missing docstring warning (ehh). pydocstyle also doesn't seem to find superclass stub method docstrings, so I'm not sure how to deal with that. Right now I'm adding |
It's a WIP, and shouldn't be treated as gospel. I don't like it either, and would have changed it myself before PR'ing. |
Yeah, it seems to me that what we want for now is just the When improving the code quality, it's often best to do that in 3 steps:
Flake 8 is best at step 3, because we rely on it to validate the code before merge & packaging. Pylint is best for 1 & 2 as it generate a report you can use from time to time to know what's wrong and what you can fix. |
I'm going to leave the rest of this stuff for 8.0. We put in a ton of doc/docstring work for 7.1, and I'd rather go over things again to fix warnings after we remove the deprecated stuff that's due for deletion in 8.0. 🙃 |
In case my closing note for #1978 wasn't clear enough, the target approach for docstrings at this moment is going to be those first 2 steps @Exirel mentioned. We'll probably want to avoid monolithic PRs for any of these, which means I fully expect the milestone to float along as we decide stuff is ready to ship and move to the next version. |
I've added flake8-quotes in #2322. |
Because this won't affect the software in any way, I've decided it needn't be part of any milestone. "Tracking" and "Long-term Planning" labels both indicate it's more of a wishlist, not part of any specific roadmap. |
I have a list of flake8 plugins I'd like to add after we release 7.0:
flake8-future-import
for easier enforcement of the required__future__
imports [Unignore more style checks #1561]flake8-import-order
to check import sorting (kind of redundant with the existingisort
project in isort: add isort to the QA tools #1752, but has the benefit of being integrated with our current checks;in-progress by me, @dgw, in a personal branch nameddone by @half-duplex in Add flake8-import-order #1864)flake8-import-order
flake8-unused-arguments
to do what it says on the tin (we can always ignore specific instances for e.g. backward compatibility with# noqa: U100
comments)flake8-comprehensions
for sanity checks—these were some of the DeepSource warnings that I thought were actually worth looking at from [POC] all: fix deepsource checks #2016[ ]Removed/NAK as the plugin can't be configured to enforce the desired style choices.flake8-quotes
to push us toward using single-quotes except when the string contains them (my own preference) (quality: add flake8-quotes #2322)flake8-requirements
for core and plugins (as we extract stuff into separate packages), to make sure dependencies stay saneflake8-string-format
to check.format()
calls—though it mightn't be maintained any more? and/or there could be places where we intentionally break the conventions for stuff like pluralizing messagesflake8-type-checking
to guard against runtime overhead from importing modules that only appear in type annotations (implement flake8-type-checking #2300)flake8-docstrings
to enforce blank lines (or not) around docstrings, and flag things that aren't documented but should beflake8-rst-docstrings
to lint reStructuredText docstrings, keeping our docs more consistentThere are probably more plugins that would be useful, which anyone may suggest here. I'll modify this checklist as needed.
The text was updated successfully, but these errors were encountered: