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

Plugin fails with latest flake8 (5.0.3) #3

Closed
Synss opened this issue Aug 3, 2022 · 3 comments · Fixed by #4
Closed

Plugin fails with latest flake8 (5.0.3) #3

Synss opened this issue Aug 3, 2022 · 3 comments · Fixed by #4

Comments

@Synss
Copy link

Synss commented Aug 3, 2022

This plugin fails with the latest flake8 (5.0.3) with the message

There was a critical error during execution of Flake8:
plugin code for `flake8-force[flake8_force]` does not match ^[A-Z]{1,3}[0-9]{0,3}$

Repro

  • Update to the latest flake8 pip install -U flake8
  • Update to the latest flake8-force pip install -U flake8-force
  • Run flake8

Result

flake8 fails with the error message reported above

Expected

flake8 checks Python as well as Cython files.

Analysis

PyCQA/flake8@f3443f4 introduced this new check in flake8.

I believe the error is in https://github.com/kmaehashi/flake8-force/blob/main/setup.py#L28 where you would need to change the left-hand side of the assignment to something that matches ^[A-Z]{1,3}[0-9]{0,3}$, there are examples https://github.com/PyCQA/flake8/blob/main/example-plugin/setup.py#L14-L17 and elsewhere. I am not really sure how to best chose these values, however.

@bdice
Copy link
Contributor

bdice commented Aug 3, 2022

Interesting. It looks like a simple fix, but a little unnecessary for this plugin because this plugin doesn't actually issue error codes, it modifies flake8 internal behaviors.

@kmaehashi
Copy link
Owner

Thanks for reporting! I'll make a release soon.

@Synss
Copy link
Author

Synss commented Aug 4, 2022

I can confirm that the fix works for me as well. Thank you both for the prompt reaction and the fix!

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 a pull request may close this issue.

3 participants