René's URL Explorer Experiment


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

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:25f8fe6f-c46d-bf82-6bfe-73589fc0eb1a
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id98D0:378262:12DE355:18B5559:696B1A3F
html-safe-nonce88ebeb5c5ef92570d502a0998b2c6971c1b321b77518e3fe37441379c244e987
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OEQwOjM3ODI2MjoxMkRFMzU1OjE4QjU1NTk6Njk2QjFBM0YiLCJ2aXNpdG9yX2lkIjoiNTAyMzUzMjU0MzAzODM5Njk5MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacfc625b85b155f025b08ad2d0f95ca349ab9f02a03a0aa3a590b72e450bbb78b3
hovercard-subject-tagpull_request:1463869684
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/107667/files
twitter:imagehttps://avatars.githubusercontent.com/u/66076021?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/66076021?s=400&v=4
og:image:altSeveral 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_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/107667/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F107667%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F107667%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/107667/files
Reloadhttps://github.com/python/cpython/pull/107667/files
Reloadhttps://github.com/python/cpython/pull/107667/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/107667/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/107667/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
AlexWaygoodhttps://github.com/AlexWaygood
python:mainhttps://github.com/python/cpython/tree/main
AlexWaygood:clinic-reprshttps://github.com/AlexWaygood/cpython/tree/clinic-reprs
Conversation 3 https://github.com/python/cpython/pull/107667
Commits 2 https://github.com/python/cpython/pull/107667/commits
Checks 0 https://github.com/python/cpython/pull/107667/checks
Files changed https://github.com/python/cpython/pull/107667/files
Please reload this pagehttps://github.com/python/cpython/pull/107667/files
gh-104683: Improve consistency and test coverage of argument-clinic __repr__ functions https://github.com/python/cpython/pull/107667/files#top
Show all changes 2 commits https://github.com/python/cpython/pull/107667/files
98e6c3a Improve consistency and test coverage of argument-clinic `__repr__` f… AlexWaygood Aug 5, 2023 https://github.com/python/cpython/pull/107667/commits/98e6c3acb36b58bfb6e14b0d1ae2c11e3ebcc9c5
d2f6bbd Simpler regexes AlexWaygood Aug 5, 2023 https://github.com/python/cpython/pull/107667/commits/d2f6bbd3405ff7b2f1a082b92e63059a774f08ad
Clear filters https://github.com/python/cpython/pull/107667/files
Please reload this pagehttps://github.com/python/cpython/pull/107667/files
Please reload this pagehttps://github.com/python/cpython/pull/107667/files
test_clinic.py https://github.com/python/cpython/pull/107667/files#diff-0267fab8cf520e17e208f9f0d8fb6fbd2ec5fb6eb5c7dbab5bc08a01239938bf
clinic.py https://github.com/python/cpython/pull/107667/files#diff-4c6b55ec7d80a3d60f100ce230eb879d9acbe2e558e01d318960e6197d7c47b3
cpp.py https://github.com/python/cpython/pull/107667/files#diff-2111eaf6decf2a7fb726b0cba3792a05c3f5d4d50dc624456378ef767cd568db
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L123
Lib/test/test_clinic.pyhttps://github.com/python/cpython/pull/107667/files#diff-0267fab8cf520e17e208f9f0d8fb6fbd2ec5fb6eb5c7dbab5bc08a01239938bf
View file https://github.com/AlexWaygood/cpython/blob/d2f6bbd3405ff7b2f1a082b92e63059a774f08ad/Lib/test/test_clinic.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/107667/{{ revealButtonHref }}
https://github.com/python/cpython/pull/107667/files#diff-0267fab8cf520e17e208f9f0d8fb6fbd2ec5fb6eb5c7dbab5bc08a01239938bf
https://github.com/python/cpython/pull/107667/files#diff-0267fab8cf520e17e208f9f0d8fb6fbd2ec5fb6eb5c7dbab5bc08a01239938bf
https://github.com/python/cpython/pull/107667/files#diff-0267fab8cf520e17e208f9f0d8fb6fbd2ec5fb6eb5c7dbab5bc08a01239938bf
https://github.com/python/cpython/pull/107667/files#diff-0267fab8cf520e17e208f9f0d8fb6fbd2ec5fb6eb5c7dbab5bc08a01239938bf
https://github.com/python/cpython/pull/107667/files#diff-0267fab8cf520e17e208f9f0d8fb6fbd2ec5fb6eb5c7dbab5bc08a01239938bf
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L122
Tools/clinic/clinic.pyhttps://github.com/python/cpython/pull/107667/files#diff-4c6b55ec7d80a3d60f100ce230eb879d9acbe2e558e01d318960e6197d7c47b3
View file https://github.com/AlexWaygood/cpython/blob/d2f6bbd3405ff7b2f1a082b92e63059a774f08ad/Tools/clinic/clinic.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/107667/{{ revealButtonHref }}
https://github.com/python/cpython/pull/107667/files#diff-4c6b55ec7d80a3d60f100ce230eb879d9acbe2e558e01d318960e6197d7c47b3
https://github.com/python/cpython/pull/107667/files#diff-4c6b55ec7d80a3d60f100ce230eb879d9acbe2e558e01d318960e6197d7c47b3
https://github.com/python/cpython/pull/107667/files#diff-4c6b55ec7d80a3d60f100ce230eb879d9acbe2e558e01d318960e6197d7c47b3
https://github.com/python/cpython/pull/107667/files#diff-4c6b55ec7d80a3d60f100ce230eb879d9acbe2e558e01d318960e6197d7c47b3
https://github.com/python/cpython/pull/107667/files#diff-4c6b55ec7d80a3d60f100ce230eb879d9acbe2e558e01d318960e6197d7c47b3
https://github.com/python/cpython/pull/107667/files#diff-4c6b55ec7d80a3d60f100ce230eb879d9acbe2e558e01d318960e6197d7c47b3
https://github.com/python/cpython/pull/107667/files#diff-4c6b55ec7d80a3d60f100ce230eb879d9acbe2e558e01d318960e6197d7c47b3
https://github.com/python/cpython/pull/107667/files#diff-4c6b55ec7d80a3d60f100ce230eb879d9acbe2e558e01d318960e6197d7c47b3
https://github.com/python/cpython/pull/107667/files#diff-4c6b55ec7d80a3d60f100ce230eb879d9acbe2e558e01d318960e6197d7c47b3
https://github.com/python/cpython/pull/107667/files#diff-4c6b55ec7d80a3d60f100ce230eb879d9acbe2e558e01d318960e6197d7c47b3
https://github.com/python/cpython/blob/main/.github/CODEOWNERS#L122
Tools/clinic/cpp.pyhttps://github.com/python/cpython/pull/107667/files#diff-2111eaf6decf2a7fb726b0cba3792a05c3f5d4d50dc624456378ef767cd568db
View file https://github.com/AlexWaygood/cpython/blob/d2f6bbd3405ff7b2f1a082b92e63059a774f08ad/Tools/clinic/cpp.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/107667/{{ revealButtonHref }}
https://github.com/python/cpython/pull/107667/files#diff-2111eaf6decf2a7fb726b0cba3792a05c3f5d4d50dc624456378ef767cd568db
https://github.com/python/cpython/pull/107667/files#diff-2111eaf6decf2a7fb726b0cba3792a05c3f5d4d50dc624456378ef767cd568db
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.