gh-104683: Improve consistency and test coverage of argument-clinic __repr__ functions#107667
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several of the
__repr__functions inTools/clinic/have no test coverage at the moment, so this PR started life as an attempt to get some easy coverage improvements. While working on adding coverage for the__repr__functions, however, I noticed that the reprs for classes inTools/clinic/can be pretty inconsistent -- e.g.Functionobjects describe themselves asclinic.Functionobjects in their reprs, butDestinationobjects just describe themselves asDestinationobjects. Some classes quoted theirself.nameattribute in their__repr__methods; others didn't. This PR therefore also improves the consistency of the__repr__methods inTools/clinic/.Coverage prior to this PR:
Coverage with this PR:
So, no change to the top-line stat, but a reasonable reduction in uncovered statements.
Tools/clinic/#104683