Skip to content

Detect duplicates in __all__ #21945

@chirizxc

Description

@chirizxc

Summary

Playground*

# ruff: noqa: D100, D101, CPY001
__all__ = (
    "DialogProtocol",
    "DialogProtocol",
)


class DialogProtocol: ...
Image

Neither Ruff nor PyCharm told me anything about this, only CodeRabbit was able to detect it.

I think it would be possible to add such a rule, especially since it is not so difficult to implement.

Metadata

Metadata

Assignees

Labels

ruleImplementing 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