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

Ignore common tools' pragmas in line-too-long (# type: ignore, # noqa: RUF001, pragma: no cover etc) #10172

Open
Pierre-Sassoulas opened this issue Jan 9, 2025 · 0 comments
Labels
Enhancement ✨ Improvement to a component Needs PR This issue is accepted, sufficiently specified and now needs an implementation

Comments

@Pierre-Sassoulas
Copy link
Member

Current problem

Sometimes a pragmas comment increases the line length to the point of triggering Pylint line-too-long warning.

Desired solution

Pylint should ignore those:

VERY_LONG_VARIABLE_NAME_YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY: float
VERY_LONG_VARIABLE_NAME_YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY = 42424  # type: ignore
VERY_LONG_VARIABLE_NAME_ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ = "test"  # noqa: E501
another_long_variable_name = "zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz"  # noqa: E501, RUF001  # pragma: no cover
another_long_variable_name = "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy"  # pylint: disable=C901

Additional context

Based on #8378

@Pierre-Sassoulas Pierre-Sassoulas added Enhancement ✨ Improvement to a component Needs PR This issue is accepted, sufficiently specified and now needs an implementation labels Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement ✨ Improvement to a component Needs PR This issue is accepted, sufficiently specified and now needs an implementation
Projects
None yet
Development

No branches or pull requests

1 participant