Use std::visit to exhaust std::variant possibilities.#30773
Use std::visit to exhaust std::variant possibilities.#30773anntzer wants to merge 1 commit intomatplotlib:text-overhaulfrom
Conversation
This makes it unnecessary to silence impossible "unhandled" cases.
QuLogic
left a comment
There was a problem hiding this comment.
IIRC, the reason for the std::get_if with an else instead of a plain std::get was that some old macOS deployment target didn't have the implementation. Since cibuildwheel appears okay with this build, I think this should be okay for us and looks clearer, for the most part.
|
The coverage is essentially about trying to hit each one of these deprecated APIs to verify that the deprecation works correctly. I wouldn't bother about it; if you really want coverage I'd rather wait until 3.11 is released and we're left with just the handling of |
|
That's fine by me but then can you do #pragma no cover or the like to explicitly flag these as not covered? I want to avoid propagating the lowered coverage. |
|
I didn't look in depth but I suspect that excluding lines from coverage in c++ is tricky (linux-test-project/lcov#44). |
|
Nah, I can take the wait til 3.11 option since it should be out soon. |
This makes it unnecessary to silence impossible "unhandled" cases. See #30607 (comment).
PR summary
PR checklist