-
-
Notifications
You must be signed in to change notification settings - Fork 54
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
[Docos] Add new FAQ entry documenting integration with Ruff. Q: "Why does Ruff hate @beartype?" A: "Dogs bark at bears." #326
Comments
Gah!!! Thanks so much for the heads up, @crypdick. Phenomenal username, btw. Simply phenomenal. Honestly, this is kinda terrible. I mean, it's great that there's a simple fix that we should now document with a new FAQ entry. But... it's terrible that literally everybody leveraging @beartype will now need to copy-paste the same boilerplate one-liner into their There's gotta be a better way. It'd be amazing if @beartype could automate this away for everybody. Does Ruff support plugins? Probably not, huh. Would Ruff itself be willing to ship this alias within the main Ruff codebase? Probably not, huh. Thus, we're stuck. I cry like a lost kitten in the rain. 😿 |
When using Ruff, sometime there are false positives for
F722
errors. The fix is to tell Ruff that the imports frombeartype.typing
should be treated as aliases for the typing module by adding a section inpyproject.toml
:The text was updated successfully, but these errors were encountered: