Skip to content

Add more readability tidy rules#5924

Merged
rwgk merged 3 commits intopybind:masterfrom
cyyever:readibility_26
Dec 8, 2025
Merged

Add more readability tidy rules#5924
rwgk merged 3 commits intopybind:masterfrom
cyyever:readibility_26

Conversation

@cyyever
Copy link
Copy Markdown
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
Copy Markdown
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
@rwgk rwgk removed the needs changelog Possibly needs a changelog entry label Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants