René's URL Explorer Experiment


Title: gh-109408: Add the docs whitespace check from patchcheck to pre-commit by hugovk · Pull Request #109854 · python/cpython · GitHub

Open Graph Title: gh-109408: Add the docs whitespace check from patchcheck to pre-commit by hugovk · Pull Request #109854 · python/cpython

X Title: gh-109408: Add the docs whitespace check from patchcheck to pre-commit by hugovk · Pull Request #109854 · python/cpython

Description: Moves one of the patchcheck checks to pre-commit. 1. patchcheck's normalize_docs_whitespace runs on files where fn.startswith('Doc') and fn.endswith(('.rst', '.inc') pre-commit's trailing-whitespace is already running on c, python and rst in the whole codebase. So this widens the check to cover inc files in the whole codebase, not just in Doc. I think this is a good thing. 2. patchcheck substitutes matches of re.compile(br'\s+(\r?\n)$') with br'\1. That is, it strips multiple trailing \r and \n characters. pre-commit's trailing-whitespace trims all trailing whitespace by default (docs). This also widens the check, I think this is a good thing. 3. Remove docs_modified(doc_files) from patchcheck, it merely printed out whether any docs files were modified. I don't think it's useful now patcheck does no docs checking, and I'd like to eventually remove patchcheck. 4. Some people might be still running make patchcheck? If so, to maintain some kind of parity, I've added steps to install and run pre-commit as part of the Makefile command. We're doing a similar thing in the PEPs repo: https://github.com/python/peps/blob/a159a9ac58ca73dc1da0b626b6df77807af455d0/Makefile#L62-L77 (And Pillow: https://github.com/python-pillow/Pillow/blob/main/Makefile) Does this seem useful, or better to leave it out? 5. Finally, some cleanup of patchcheck.py: whitespace, f-strings, consistent pluralised outputs, fix typo. Issue: gh-109408

Open Graph Description: Moves one of the patchcheck checks to pre-commit. 1. patchcheck's normalize_docs_whitespace runs on files where fn.startswith('Doc') and fn.endswith(('.rst', '.inc') pre...

X Description: Moves one of the patchcheck checks to pre-commit. 1. patchcheck's normalize_docs_whitespace runs on files where fn.startswith('Doc') and fn.endswith(('.rst',...

Opengraph URL: https://github.com/python/cpython/pull/109854

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/commits/:range(.:format)
route-controllerpull_requests
route-actioncommits
fetch-noncev2:687d72ec-68f6-e938-7c55-2f19a45b91c1
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idDEB6:1CA3C3:6CACEC:9262F7:69963207
html-safe-nonce445028fac07b3e4be1a5bb8b0a6fc78166ae7f53577ac5a8645fe283ee735433
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERUI2OjFDQTNDMzo2Q0FDRUM6OTI2MkY3OjY5OTYzMjA3IiwidmlzaXRvcl9pZCI6IjY3MTgwNTYxMjM4MjI2NDk4NjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaccf96b573ee241f93df5f9cd76a57530e33386f43fc060efa563751d1c8143449
hovercard-subject-tagpull_request:1529099537
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/commits
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517
twitter:imagehttps://avatars.githubusercontent.com/u/1324225?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1324225?s=400&v=4
og:image:altMoves one of the patchcheck checks to pre-commit. 1. patchcheck's normalize_docs_whitespace runs on files where fn.startswith('Doc') and fn.endswith(('.rst', '.inc') pre...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None979c1ab77a40e0dbb8d76f1c427190824693a0e72e7a954636654843f3881905
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
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release999924f6ca451247a9a3a0ef516776ac16e7135f
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F109854%2Fcommits%2Fdff437b42ca53f884444e87f90ba3118e26b5517
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%2F109854%2Fcommits%2Fdff437b42ca53f884444e87f90ba3118e26b5517
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%2Fcommits&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517
Reloadhttps://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517
Reloadhttps://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 34.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.6k 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 0 https://github.com/python/cpython/security
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
hugovkhttps://github.com/hugovk
python:mainhttps://github.com/python/cpython/tree/main
hugovk:patchcheck-docs-whitespacehttps://github.com/hugovk/cpython/tree/patchcheck-docs-whitespace
Conversation 23 https://github.com/python/cpython/pull/109854
Commits 12 https://github.com/python/cpython/pull/109854/commits
Checks 0 https://github.com/python/cpython/pull/109854/checks
Files changed https://github.com/python/cpython/pull/109854/files
Please reload this pagehttps://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517
gh-109408: Add the docs whitespace check from patchcheck to pre-commit https://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517#top
Show all changes 12 commits https://github.com/python/cpython/pull/109854/files
dff437b Run pre-commit as part of 'make patchcheck' hugovk Sep 20, 2023 https://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517
97c6ccf Use f-strings hugovk Sep 20, 2023 https://github.com/python/cpython/pull/109854/commits/97c6ccfe5061a0bd90edb8a8c0f248feefa58dcd
029a9a4 Add whitespace hugovk Sep 20, 2023 https://github.com/python/cpython/pull/109854/commits/029a9a4c16cda106cacd0fc70177880f84469c5f
d7690a3 Properly pluralise file(s), fix Unix typo hugovk Sep 20, 2023 https://github.com/python/cpython/pull/109854/commits/d7690a3588a7f32117a730c35a2697fa9cc17688
5cfcd19 Remove normalize_docs_whitespace from patchcheck, it's covered by pre… hugovk Sep 20, 2023 https://github.com/python/cpython/pull/109854/commits/5cfcd19a69f2f63dcad5e4be31cec478efad3e63
1eb8042 Include inc files in pre-commit's trailing-whitespace hugovk Sep 20, 2023 https://github.com/python/cpython/pull/109854/commits/1eb8042bcd2f21dfdd1f7acc291e3edb45037e94
a85cd1c Fix string hugovk Sep 25, 2023 https://github.com/python/cpython/pull/109854/commits/a85cd1c27ecde5e4e4d33afcae094b855b06a27e
433153d Use "s" variable for readability hugovk Sep 25, 2023 https://github.com/python/cpython/pull/109854/commits/433153d6fd65581e1cb538c45c4e04dad874cc72
a429344 Reinstate docs_modified hugovk Sep 25, 2023 https://github.com/python/cpython/pull/109854/commits/a4293442f25a2078ca54b2e68b219da1f6841264
63c6d17 Reinstate doc_files for docs_modified hugovk Sep 26, 2023 https://github.com/python/cpython/pull/109854/commits/63c6d17a895e7a0abb19f08781ac82390c283d88
05a5d35 Revert makefile changes hugovk Sep 27, 2023 https://github.com/python/cpython/pull/109854/commits/05a5d357d83932441d1e7834523d07c686c6aa6d
f4b16ec Merge branch 'main' into patchcheck-docs-whitespace hugovk Oct 10, 2023 https://github.com/python/cpython/pull/109854/commits/f4b16ecf675f58e04c037cd87c016a2a1c4a38ff
Clear filters https://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517
Please reload this pagehttps://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517
Please reload this pagehttps://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517
Next https://github.com/python/cpython/pull/109854/commits/97c6ccfe5061a0bd90edb8a8c0f248feefa58dcd
Please reload this pagehttps://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517
https://github.com/hugovk
hugovkhttps://github.com/python/cpython/commits?author=hugovk
Makefile.pre.inhttps://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517#diff-1f0a8db227d22005511b0d90f5339b97db345917b863954b3b3ccb9ec308767c
View file https://github.com/hugovk/cpython/blob/dff437b42ca53f884444e87f90ba3118e26b5517/Makefile.pre.in
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/109854/commits/{{ revealButtonHref }}
https://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517#diff-1f0a8db227d22005511b0d90f5339b97db345917b863954b3b3ccb9ec308767c
AA-Turnerhttps://github.com/AA-Turner
Sep 25, 2023https://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517#r1336221364
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517
hugovkhttps://github.com/hugovk
Sep 25, 2023https://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517#r1336280935
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
Please reload this pagehttps://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517
AA-Turnerhttps://github.com/AA-Turner
Sep 26, 2023https://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517#r1336738399
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
patchcheck is mentionedhttps://devguide.python.org/getting-started/pull-request-lifecycle/#patchcheck
Please reload this pagehttps://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517
hugovkhttps://github.com/hugovk
Sep 27, 2023https://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517#r1339133783
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://discuss.python.org/t/do-you-use-make-patchcheck/34743?u=hugovkhttps://discuss.python.org/t/do-you-use-make-patchcheck/34743?u=hugovk
Please reload this pagehttps://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517
https://github.com/python/cpython/pull/109854/commits/dff437b42ca53f884444e87f90ba3118e26b5517#diff-1f0a8db227d22005511b0d90f5339b97db345917b863954b3b3ccb9ec308767c
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.