Skip to content

E501 does account pyrefly: ignore comments as violations #24011

@sobolevn

Description

@sobolevn

Example:

class Whatever:
    def some(self) -> None:
        if (
            not_found not in responses
            and (
                pattern.pattern.converters
                or pattern.pattern.regex.groupindex  # pyrefly: ignore[missing-attribute]
            )
        ):
              pass

Produces:

E501 Line too long (89 > 80)
   --> dmr/metadata.py:399:81
    |
397 |             and (
398 |                 pattern.pattern.converters
399 |                 or pattern.pattern.regex.groupindex  # pyrefly: ignore[missing-attribute]
    |                                                                                 ^^^^^^^^^
400 |             )
401 |         ):
    |

Found 1 error.

when I configure ruff to use 80 as my line length.
However, when I change pyrefly comment to be pyright, the issue is gone.

I think that pyrefly should also be supported.

Metadata

Metadata

Assignees

Labels

good first issueGood for newcomersruleImplementing or modifying a lint rule

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions