Skip to content

Conversation

@rwgk
Copy link
Collaborator

@rwgk rwgk commented Feb 10, 2022

Description

After this PR is merged we are ready for the last fully-automatic step: PR #3713.

Informed by experimental work under #3708, which is this PR + clang-format in pre-commit.

Suggested changelog entry:

@rwgk rwgk marked this pull request as ready for review February 10, 2022 01:35
@rwgk rwgk requested a review from henryiii as a code owner February 10, 2022 01:35
@rwgk rwgk requested a review from Skylion007 February 10, 2022 01:35
ssize_t itemsize = 0; // Size of individual items in bytes
ssize_t size = 0; // Total number of entries
std::string format; // For homogeneous buffers, this should be set to format_descriptor<T>::format()
std::string format; // For homogeneous buffers, this should be set to
Copy link
Collaborator

Choose a reason for hiding this comment

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

FWIW, for these sorts of things, I'd do something like:

<empty line>
// Comment
std::string thing;

That will format much better, remain readable, and use less horizontal space for some extra vertical space.

No need to do that now. But that would be my general solution.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Totally agree.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I was going back and forth myself exactly here, then decided clang-format is actually doing a very nice job, preserving the original intent (no semi-pun intended). It's not obvious here, but if you look under #3713 it's great there. — But I'm happy to change it around. What do you prefer? Put only some comments on top, as needed? Or all, systematically?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's go with that then. Merge at your discretion.

Comment on lines +997 to +1001
// Placeholder type for the unneeded (and dead code) static variable in the
// PYBIND11_OVERRIDE_OVERRIDE macro
struct override_unused {};
Copy link
Collaborator

Choose a reason for hiding this comment

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

Like this. :)

@rwgk
Copy link
Collaborator Author

rwgk commented Feb 10, 2022

The testing for #3713 succeeded. I will merge this now. I will then rebase #3713 on master and run the testing once again, although it should be exactly the same, out of an abundance of caution.

@rwgk rwgk merged commit e96221b into pybind:master Feb 10, 2022
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Feb 10, 2022
@rwgk rwgk removed the needs changelog Possibly needs a changelog entry label Feb 10, 2022
@rwgk rwgk deleted the clang-format_T-1 branch February 10, 2022 21:29
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.

3 participants