-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Request: allowlist setting for N812
/N817
#12031
Comments
It does look like those rules respect the setting, but confusingly... N812 matches against the |
So to write it out, I think:
Does that answer your question? |
Actually what I was asking is: given |
Oh I see now. Yeah I think I would want to put Open to specifying |
I changed it to respect both. The rules were inconsistent as to which they looked at. |
Thank you! Appreciate the fast turnaround 👍 |
There are certain libraries like PyTorch's FSDP that standardized on being imported with all caps:
Currently, with Ruff 0.4.10 you just have to use a
# noqa: N817
for every import line of libraries like FSDP.Also, a similar PyTorch use case is
from torch.nn import functional as F
, which raises N812.Ideally, there is a configuration option to build up an allowlist of possible names to not raise N812/N817. I tried using the
ignore-names
orextend-ignore-names
settings, but neither worked.Do you think we can either allow
ignore-names
to apply to N817, or create a new optionignore-acronyms
that can accommodate this use case?Thank you for your consideration!
The text was updated successfully, but these errors were encountered: