Skip to content

Conversation

@cyyever
Copy link
Contributor

@cyyever cyyever commented Dec 8, 2025

Description

This PR adds readability-redundant-casting and readability-redundant-casting from clang-tidy, and applies their fixes.

Suggested changelog entry:

* These clang-tidy rules were added: `readability-redundant-casting`, `readability-redundant-inline-specifier`, `readability-redundant-member-init`

Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
@cyyever cyyever requested a review from henryiii as a code owner December 8, 2025 02:52
@cyyever cyyever changed the title Apply clang-tidy readability fixes Add readability-redundant-casting and Dec 8, 2025
@cyyever cyyever changed the title Add readability-redundant-casting and Add more readability tidy rules Dec 8, 2025
Signed-off-by: Yuanyuan Chen <cyyever@outlook.com>
@cyyever cyyever force-pushed the readibility_26 branch 6 times, most recently from ff009c0 to 5e6a858 Compare December 8, 2025 04:39
Signed-off-by: cyy <cyyever@outlook.com>
Copy link
Collaborator

@rwgk rwgk left a comment

Choose a reason for hiding this comment

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

Nice, thanks!

I'm surprised that the cast in init_holder_from_existing is redundant, but all tests pass (except the known broken ones), so clang-tidy must be correct.

@rwgk rwgk merged commit 3ebbecb into pybind:master Dec 8, 2025
81 of 85 checks passed
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Dec 8, 2025
@cyyever cyyever deleted the readibility_26 branch December 8, 2025 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs changelog Possibly needs a changelog entry

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants