Skip to content

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

Open
@Pierre-Sassoulas

Description

@Pierre-Sassoulas

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Enhancement ✨Improvement to a componentNeeds PRThis issue is accepted, sufficiently specified and now needs an implementation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions