Skip to content

Should eq-without-hash (PLW1641) not apply to stubs? #15292

@Avasam

Description

@Avasam

I don't think that eq-without-hash (PLW1641) should apply to stubs (it currently does).
Stubs authors should aim to faithfully represent the runtime implementation. And if the runtime doesn't implement __hash__, the stubs shouldn't define it either.

Third-party stub authors have no control on this. First-party stubs would get FURB189 in their source .py files.

Ruff: 0.8.5 (rule is currently in preview)

(this report is extracted from #14535 (comment) for ease of tracking and discussion)

Metadata

Metadata

Assignees

Labels

previewRelated to preview mode featuresruleImplementing 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