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

Make flake8 an optional dependency #348

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jakkdl
Copy link
Member

@jakkdl jakkdl commented Feb 5, 2025

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 on flake8 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 do c they'll get a more obvious error that flake8 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 string ASYNC when flake8-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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants