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

Add option to ignore N812 for specific packages #226

Open
usamec opened this issue Nov 21, 2023 · 2 comments
Open

Add option to ignore N812 for specific packages #226

usamec opened this issue Nov 21, 2023 · 2 comments

Comments

@usamec
Copy link

usamec commented Nov 21, 2023

This typical ML idiom:
import torch.nn.functional as F (see https://github.com/pytorch/examples/blob/main/mnist/main.py#L5)

gets flagged as:
N812 Lowercase functional imported as non-lowercase 'F'

I would like to have an option to enable using this specific package without having to write noqa on every import line or disabling N812 entirely. Is it possible?

@saravanabalagi
Copy link

Also when using lightning, I get:
N812 Lowercase lightning imported as non-lowercase L

@j-4
Copy link

j-4 commented Oct 18, 2024

same holds true for pyspark, where

from pyspark.sql import functions as F
from pyspark.sql import types as T

are unwritten standards.

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

No branches or pull requests

3 participants