Make flake8 an optional dependency #348
Open
+113
−21
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This has been lying around mostly-finished in a branch for a while, so I thought I'd clean it up and push it.
Writing our own parser of
noqa
was easy, but we still rely onflake8
for parsing config files. This means a subset of users that:a. use flake8 config
b. do not install any other flake8 plugins or flake8 itself in that venv, and
c. run the linter with
flake8-async
will ~silently get a large change in behavior and they have to go look up the changelog to see they now need to install
flake8-async[flake8]
. If they don't doc
they'll get a more obvious error thatflake8
is not available.(only doing b and not c will also give a fairly obvious error)
I'm not sure how many people that will affect, but it might be worth quickly searching
pyproject.toml
or.flake8
for the stringASYNC
whenflake8-async
is invoked and give a big warning. Maybe even make it a two-step deprecation+release where we add the extra+warning now, and remove flake8 as a dependency in a couple weeks.