Title: gh-104683: Improve consistency and test coverage of argument-clinic `__repr__` functions by AlexWaygood · Pull Request #107667 · python/cpython · GitHub
Open Graph Title: gh-104683: Improve consistency and test coverage of argument-clinic `__repr__` functions by AlexWaygood · Pull Request #107667 · python/cpython
X Title: gh-104683: Improve consistency and test coverage of argument-clinic `__repr__` functions by AlexWaygood · Pull Request #107667 · python/cpython
Description: Several of the __repr__ functions in Tools/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 in Tools/clinic/ can be pretty inconsistent -- e.g. Function objects describe themselves as clinic.Function objects in their reprs, but Destination objects just describe themselves as Destination objects. Some classes quoted their self.name attribute in their __repr__ methods; others didn't. This PR therefore also improves the consistency of the __repr__ methods in Tools/clinic/. Coverage prior to this PR: Name Stmts Miss Branch BrPart Cover ---------------------------------------------------------- Tools\clinic\clinic.py 2947 135 1236 114 94% Tools\clinic\cpp.py 102 9 54 2 90% ---------------------------------------------------------- TOTAL 3049 144 1290 116 94% Coverage with this PR: Name Stmts Miss Branch BrPart Cover ---------------------------------------------------------- Tools\clinic\clinic.py 2948 119 1236 115 94% Tools\clinic\cpp.py 103 8 54 2 91% ---------------------------------------------------------- TOTAL 3051 127 1290 117 94% So, no change to the top-line stat, but a reasonable reduction in uncovered statements. Issue: gh-104683
Open Graph Description: Several of the __repr__ functions in Tools/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 coverag...
X Description: Several of the __repr__ functions in Tools/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 coverag...
Opengraph URL: https://github.com/python/cpython/pull/107667
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:25f8fe6f-c46d-bf82-6bfe-73589fc0eb1a |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 98D0:378262:12DE355:18B5559:696B1A3F |
| html-safe-nonce | 88ebeb5c5ef92570d502a0998b2c6971c1b321b77518e3fe37441379c244e987 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OEQwOjM3ODI2MjoxMkRFMzU1OjE4QjU1NTk6Njk2QjFBM0YiLCJ2aXNpdG9yX2lkIjoiNTAyMzUzMjU0MzAzODM5Njk5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | fc625b85b155f025b08ad2d0f95ca349ab9f02a03a0aa3a590b72e450bbb78b3 |
| hovercard-subject-tag | pull_request:1463869684 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/107667/files |
| twitter:image | https://avatars.githubusercontent.com/u/66076021?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/66076021?s=400&v=4 |
| og:image:alt | Several of the __repr__ functions in Tools/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 coverag... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 82560a55c6b2054555076f46e683151ee28a19bc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width