René's URL Explorer Experiment


Title: Revise type annotations slightly by EliahKagan · Pull Request #1860 · gitpython-developers/GitPython · GitHub

Open Graph Title: Revise type annotations slightly by EliahKagan · Pull Request #1860 · gitpython-developers/GitPython

X Title: Revise type annotations slightly by EliahKagan · Pull Request #1860 · gitpython-developers/GitPython

Description: This pull request is mostly a small revision to type hints to improve a couple things I had noticed when working on #1850 but omitted from there to avoid bloating its scope: 9f226fc: __slots__ is typically unannotated, but in once place it had an unnecessary annotation. 5d7e55b: Although mypy treats it the same when there are parameter annotations, __init__ is best annotated with an explicit return type of None, per PEP 484. In addition, I noticed some slight under-indentation in a few docstrings I had worked on #1850, and fixed that here in e984bfe. (The type annotation tweaks are sufficiently minor that there is an argument to be made that this is really the most significant individual change in this pull request.) There is some more information in the commit messages.

Open Graph Description: This pull request is mostly a small revision to type hints to improve a couple things I had noticed when working on #1850 but omitted from there to avoid bloating its scope: 9f226fc: __slots__ is ...

X Description: This pull request is mostly a small revision to type hints to improve a couple things I had noticed when working on #1850 but omitted from there to avoid bloating its scope: 9f226fc: __slots__ is ...

Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1860

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:e7f80193-9e97-8d3e-e16d-e1115199fadf
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idD622:C6D2A:62EA18:849F9F:69683965
html-safe-noncebd27a0d875336cceb26c2a220f4798a3605a2255c67fee68ccdf1e8dfa3f48af
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENjIyOkM2RDJBOjYyRUExODo4NDlGOUY6Njk2ODM5NjUiLCJ2aXNpdG9yX2lkIjoiNTY0NjAyNjA1NDc0MDQ5MDU5NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmaca603ebadd573a6aedc5573f8e348f18f4c06f899d8d7efa88f0806bc942901d8
hovercard-subject-tagpull_request:1755867249
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/gitpython-developers/GitPython/pull/1860/files
twitter:imagehttps://avatars.githubusercontent.com/u/1771172?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/1771172?s=400&v=4
og:image:altThis pull request is mostly a small revision to type hints to improve a couple things I had noticed when working on #1850 but omitted from there to avoid bloating its scope: 9f226fc: __slots__ is ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Nonee25f416bb6d8a5f8624aad6cebc375ab2c50ac58f2175f32a7093325e66e5515
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git
octolytics-dimension-user_id503709
octolytics-dimension-user_logingitpython-developers
octolytics-dimension-repository_id1126087
octolytics-dimension-repository_nwogitpython-developers/GitPython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1126087
octolytics-dimension-repository_network_root_nwogitpython-developers/GitPython
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
release32212b8b3bddd6432b3b35d27c050b1c22bd8cca
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/gitpython-developers/GitPython/pull/1860/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F1860%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%2Fgitpython-developers%2FGitPython%2Fpull%2F1860%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=gitpython-developers%2FGitPython
Reloadhttps://github.com/gitpython-developers/GitPython/pull/1860/files
Reloadhttps://github.com/gitpython-developers/GitPython/pull/1860/files
Reloadhttps://github.com/gitpython-developers/GitPython/pull/1860/files
gitpython-developers https://github.com/gitpython-developers
GitPythonhttps://github.com/gitpython-developers/GitPython
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/1860/files
Notifications https://github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Fork 964 https://github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Star 5k https://github.com/login?return_to=%2Fgitpython-developers%2FGitPython
Code https://github.com/gitpython-developers/GitPython
Issues 169 https://github.com/gitpython-developers/GitPython/issues
Pull requests 8 https://github.com/gitpython-developers/GitPython/pulls
Discussions https://github.com/gitpython-developers/GitPython/discussions
Actions https://github.com/gitpython-developers/GitPython/actions
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/gitpython-developers/GitPython/security
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/1860/files
Insights https://github.com/gitpython-developers/GitPython/pulse
Code https://github.com/gitpython-developers/GitPython
Issues https://github.com/gitpython-developers/GitPython/issues
Pull requests https://github.com/gitpython-developers/GitPython/pulls
Discussions https://github.com/gitpython-developers/GitPython/discussions
Actions https://github.com/gitpython-developers/GitPython/actions
Security https://github.com/gitpython-developers/GitPython/security
Insights https://github.com/gitpython-developers/GitPython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fgitpython-developers%2FGitPython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fgitpython-developers%2FGitPython%2Fissues%2Fnew%2Fchoose
Byronhttps://github.com/Byron
gitpython-developers:mainhttps://github.com/gitpython-developers/GitPython/tree/main
EliahKagan:typing-tweakshttps://github.com/EliahKagan/GitPython/tree/typing-tweaks
Conversation 1 https://github.com/gitpython-developers/GitPython/pull/1860
Commits 3 https://github.com/gitpython-developers/GitPython/pull/1860/commits
Checks 0 https://github.com/gitpython-developers/GitPython/pull/1860/checks
Files changed 7 https://github.com/gitpython-developers/GitPython/pull/1860/files
Revise type annotations slightly https://github.com/gitpython-developers/GitPython/pull/1860/files#top
Show all changes 3 commits https://github.com/gitpython-developers/GitPython/pull/1860/files
9f226fc Remove unneeded annotation on __slots__ variable EliahKagan Mar 5, 2024 https://github.com/gitpython-developers/GitPython/pull/1860/commits/9f226fc47683038acd3304dd7d59be18984d3737
e984bfe Fix some underindented portions of docstrings EliahKagan Mar 5, 2024 https://github.com/gitpython-developers/GitPython/pull/1860/commits/e984bfebd9f1934b9810ac6cccb1bb803c64dd21
5d7e55b Add return-type annotation on __init__ methods EliahKagan Mar 5, 2024 https://github.com/gitpython-developers/GitPython/pull/1860/commits/5d7e55b8dd2abaacd5397860e6efd7bd4215fe12
Clear filters https://github.com/gitpython-developers/GitPython/pull/1860/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/1860/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/1860/files
cmd.py https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-35a18a749eb4d6efad45e56e78a9554926be5526e2ba2159b44311e718450e88
base.py https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-4fcf911ecd03484eb6c89186dde3ebaa272e9925d4c0da8a5dd358770aa9d21e
root.py https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-7df742abf80356d1e22c392ee26cd2d87f89158b9f70bff6fb936eaf4c7e7faf
head.py https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-79302e4aa7752927c17b41ff1d8f51292daf92f3798b95d3c37264bf09b7955e
log.py https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-06a8205a3aebe461db012c34e9753d67272695696206fa0ab0c0e0a5ec1170bf
symbolic.py https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-72d42177f0e8535634711b5de0390d5bc81dbedab1fbac6547e5b9ab3b03eb9a
util.py https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-cb13395ac36dd593e722ec548880a091f39732af5c934880144d1a95de67944e
git/cmd.pyhttps://github.com/gitpython-developers/GitPython/pull/1860/files#diff-35a18a749eb4d6efad45e56e78a9554926be5526e2ba2159b44311e718450e88
View file https://github.com/EliahKagan/GitPython/blob/5d7e55b8dd2abaacd5397860e6efd7bd4215fe12/git/cmd.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/1860/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-35a18a749eb4d6efad45e56e78a9554926be5526e2ba2159b44311e718450e88
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-35a18a749eb4d6efad45e56e78a9554926be5526e2ba2159b44311e718450e88
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-35a18a749eb4d6efad45e56e78a9554926be5526e2ba2159b44311e718450e88
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-35a18a749eb4d6efad45e56e78a9554926be5526e2ba2159b44311e718450e88
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-35a18a749eb4d6efad45e56e78a9554926be5526e2ba2159b44311e718450e88
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-35a18a749eb4d6efad45e56e78a9554926be5526e2ba2159b44311e718450e88
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-35a18a749eb4d6efad45e56e78a9554926be5526e2ba2159b44311e718450e88
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-35a18a749eb4d6efad45e56e78a9554926be5526e2ba2159b44311e718450e88
git/objects/base.pyhttps://github.com/gitpython-developers/GitPython/pull/1860/files#diff-4fcf911ecd03484eb6c89186dde3ebaa272e9925d4c0da8a5dd358770aa9d21e
View file https://github.com/EliahKagan/GitPython/blob/5d7e55b8dd2abaacd5397860e6efd7bd4215fe12/git/objects/base.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/1860/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-4fcf911ecd03484eb6c89186dde3ebaa272e9925d4c0da8a5dd358770aa9d21e
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-4fcf911ecd03484eb6c89186dde3ebaa272e9925d4c0da8a5dd358770aa9d21e
git/objects/submodule/root.pyhttps://github.com/gitpython-developers/GitPython/pull/1860/files#diff-7df742abf80356d1e22c392ee26cd2d87f89158b9f70bff6fb936eaf4c7e7faf
View file https://github.com/EliahKagan/GitPython/blob/5d7e55b8dd2abaacd5397860e6efd7bd4215fe12/git/objects/submodule/root.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/1860/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-7df742abf80356d1e22c392ee26cd2d87f89158b9f70bff6fb936eaf4c7e7faf
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-7df742abf80356d1e22c392ee26cd2d87f89158b9f70bff6fb936eaf4c7e7faf
git/refs/head.pyhttps://github.com/gitpython-developers/GitPython/pull/1860/files#diff-79302e4aa7752927c17b41ff1d8f51292daf92f3798b95d3c37264bf09b7955e
View file https://github.com/EliahKagan/GitPython/blob/5d7e55b8dd2abaacd5397860e6efd7bd4215fe12/git/refs/head.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/1860/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-79302e4aa7752927c17b41ff1d8f51292daf92f3798b95d3c37264bf09b7955e
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-79302e4aa7752927c17b41ff1d8f51292daf92f3798b95d3c37264bf09b7955e
git/refs/log.pyhttps://github.com/gitpython-developers/GitPython/pull/1860/files#diff-06a8205a3aebe461db012c34e9753d67272695696206fa0ab0c0e0a5ec1170bf
View file https://github.com/EliahKagan/GitPython/blob/5d7e55b8dd2abaacd5397860e6efd7bd4215fe12/git/refs/log.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/1860/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-06a8205a3aebe461db012c34e9753d67272695696206fa0ab0c0e0a5ec1170bf
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-06a8205a3aebe461db012c34e9753d67272695696206fa0ab0c0e0a5ec1170bf
git/refs/symbolic.pyhttps://github.com/gitpython-developers/GitPython/pull/1860/files#diff-72d42177f0e8535634711b5de0390d5bc81dbedab1fbac6547e5b9ab3b03eb9a
View file https://github.com/EliahKagan/GitPython/blob/5d7e55b8dd2abaacd5397860e6efd7bd4215fe12/git/refs/symbolic.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/1860/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-72d42177f0e8535634711b5de0390d5bc81dbedab1fbac6547e5b9ab3b03eb9a
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-72d42177f0e8535634711b5de0390d5bc81dbedab1fbac6547e5b9ab3b03eb9a
git/util.pyhttps://github.com/gitpython-developers/GitPython/pull/1860/files#diff-cb13395ac36dd593e722ec548880a091f39732af5c934880144d1a95de67944e
View file https://github.com/EliahKagan/GitPython/blob/5d7e55b8dd2abaacd5397860e6efd7bd4215fe12/git/util.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/1860/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-cb13395ac36dd593e722ec548880a091f39732af5c934880144d1a95de67944e
https://github.com/gitpython-developers/GitPython/pull/1860/files#diff-cb13395ac36dd593e722ec548880a091f39732af5c934880144d1a95de67944e
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.