Skip to content

Additional flake8 plugins we'd like to use #1765

@dgw

Description

@dgw

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 existing isort 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 named flake8-import-order done by @half-duplex in Add flake8-import-order #1864)
  • 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
  • [ ] flake8-quotes to push us toward using single-quotes except when the string contains them (my own preference) (quality: add flake8-quotes #2322) Removed/NAK as the plugin can't be configured to enforce the desired style choices.
  • flake8-requirements for core and plugins (as we extract stuff into separate packages), to make sure dependencies stay sane
  • flake8-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 messages
  • flake8-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 be
  • flake8-rst-docstrings to lint reStructuredText docstrings, keeping our docs more consistent

There are probably more plugins that would be useful, which anyone may suggest here. I'll modify this checklist as needed.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions