Skip to content

[pylint] De-emphasize __hash__ = Parent.__hash__ (PLW1641) #18613

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

Merged
merged 2 commits into from
Jun 10, 2025

Conversation

ntBre
Copy link
Contributor

@ntBre ntBre commented Jun 10, 2025

Summary

This PR updates the docs for PLW1641 to place less emphasis on the example of inheriting a parent class's __hash__ implementation by both reducing the length of the example and warning that it may be unsound in general, as @AlexWaygood pointed out on Notion.

Test plan

Existing tests

Summary
--

This PR updates the docs for PLW1641 to place less emphasis on the example of
inheriting a parent class's `__hash__` implementation by both reducing the
length of the example and warning that it may be unsound in general, as
@AlexWaygood pointed out on Notion.

Test plan
--

Existing tests
@ntBre ntBre requested a review from AlexWaygood June 10, 2025 18:04
Copy link
Member

@AlexWaygood AlexWaygood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thank you! Some unrelated wordsmithing that we could also do while we're here:

@AlexWaygood AlexWaygood added the documentation Improvements or additions to documentation label Jun 10, 2025
Copy link
Contributor

github-actions bot commented Jun 10, 2025

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Co-authored-by: Alex Waygood <[email protected]>
@ntBre ntBre enabled auto-merge (squash) June 10, 2025 18:19
@ntBre ntBre merged commit 6cd0669 into main Jun 10, 2025
33 checks passed
@ntBre ntBre deleted the brent/plw1641-docs branch June 10, 2025 18:21
dcreager added a commit that referenced this pull request Jun 10, 2025
* main:
  [`pylint`] De-emphasize `__hash__ = Parent.__hash__` (`PLW1641`) (#18613)
  [`flake8-pyi`] Avoid syntax error in the case of starred and keyword arguments (`PYI059`) (#18611)
  [ty] Add support for global __debug__ constant (#18540)
  [`ruff`] Preserve parentheses around `deque` in fix for `unnecessary-empty-iterable-within-deque-call` (`RUF037`) (#18598)
  [`refurb`] Parenthesize lambda and ternary expressions in iter (`FURB122`, `FURB142`) (#18592)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants