-
Notifications
You must be signed in to change notification settings - Fork 23
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
Reduce the amount of monkeypatching we do #183
Labels
Comments
Yes, ideally flake8 should have native support for linting pyi files, and then this plugin can focus just on providing pyi-specific error codes, instead of the crazy monkeypatching we do right now. |
This was referenced Jul 30, 2022
AlexWaygood
pushed a commit
that referenced
this issue
May 3, 2023
Chipping away at #183 Got rid of the monkeypatched `LAMBDA`. What's changed -> - Default argument values cannot be forward references anymore: ```python def bar(x: type = SomeClass) -> None: ... # F821 undefined name 'SomeClass' class SomeClass: ... ``` I think it makes sense to not allow this anyway - it's similar to what we did with classes previously.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have been explicitly warned that the next release of flake8 is likely to break flake8-pyi, due to the amount of monkeypatching we do in this plugin, and a refactoring of flake8 internals that's currently underway. We should probably do something about that.
Ideally, I think we'd file PRs to flake8 and pyflakes so that they become pyi-compatible out of the box, rendering some of the crazy hacks in our code base unnecessary. I'm not really sure where to start, though.
The text was updated successfully, but these errors were encountered: