René's URL Explorer Experiment


Title: Adding inital types to remote.py by Yobmod · Pull Request #1229 · gitpython-developers/GitPython · GitHub

Open Graph Title: Adding inital types to remote.py by Yobmod · Pull Request #1229 · gitpython-developers/GitPython

X Title: Adding inital types to remote.py by Yobmod · Pull Request #1229 · gitpython-developers/GitPython

Description: Adding types to remote.py: add_progress() to_progress_instance() PushInfo. init() old_commit() remote_ref() FetchInfo. refresh() init() str() name() commit() _from_line() A few places the functions can take multiple Reference types including child and parent classes (e.g. Reference, TagReference, RemoteReference, SymbolicReference). In those cases i've used the base class that covers them all (e.g. SymbolicReference). I could change that to a union of all the classes if it would be better. I copied the compat.typing Literal and Final import logic to types.py, as it would be used in multiple places, not just compat.py. I didn't remove it from compat yet, in case there were bigger plans for it being a module. Q. PushInfo.init() and FetchInfo() both have an 'old_commit' arg. Should they be the same type (bytes or string rather than a Commit object?) Theres a comment saying should be bytes, but that gives 14 mypy errors, whereas str gives no errors. A leftover from py2?

Open Graph Description: Adding types to remote.py: add_progress() to_progress_instance() PushInfo. init() old_commit() remote_ref() FetchInfo. refresh() init() str() name() commit() _from_line() A few places the functio...

X Description: Adding types to remote.py: add_progress() to_progress_instance() PushInfo. init() old_commit() remote_ref() FetchInfo. refresh() init() str() name() commit() _from_line() A few places the functio...

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

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:d9362b18-1bdb-c695-0f52-b507efabb03c
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idCDE8:96E3C:29FD229:3A501B6:69694FAE
html-safe-nonce83dd6ed2aebfcddc9159a39f315b67ffe51b5e061f4324095c07759bbcec95a7
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDREU4Ojk2RTNDOjI5RkQyMjk6M0E1MDFCNjo2OTY5NEZBRSIsInZpc2l0b3JfaWQiOiI0Mjg5NTExMzk2NTE3NDMzMjYyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmac1077876e18d9485e08b8faa7bbfaaa6fd60317d9bdf3ad42841a24ce6dfb31ef
hovercard-subject-tagpull_request:629182256
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/1229/files
twitter:imagehttps://avatars.githubusercontent.com/u/22235459?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/22235459?s=400&v=4
og:image:altAdding types to remote.py: add_progress() to_progress_instance() PushInfo. init() old_commit() remote_ref() FetchInfo. refresh() init() str() name() commit() _from_line() A few places the functio...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d
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
released69ac0477df0f87da03b8b06cebd187012d7a930
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/gitpython-developers/GitPython/pull/1229/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgitpython-developers%2FGitPython%2Fpull%2F1229%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%2F1229%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/1229/files
Reloadhttps://github.com/gitpython-developers/GitPython/pull/1229/files
Reloadhttps://github.com/gitpython-developers/GitPython/pull/1229/files
gitpython-developers https://github.com/gitpython-developers
GitPythonhttps://github.com/gitpython-developers/GitPython
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/1229/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/1229/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
Conversation 3 https://github.com/gitpython-developers/GitPython/pull/1229
Commits 18 https://github.com/gitpython-developers/GitPython/pull/1229/commits
Checks 0 https://github.com/gitpython-developers/GitPython/pull/1229/checks
Files changed 3 https://github.com/gitpython-developers/GitPython/pull/1229/files
Adding inital types to remote.py https://github.com/gitpython-developers/GitPython/pull/1229/files#top
Show all changes 18 commits https://github.com/gitpython-developers/GitPython/pull/1229/files
ad4079d add types to base.py and fun.py Yobmod Feb 28, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/ad4079dde47ce721e7652f56a81a28063052a166
5b0028e start add types to util.py Yobmod Feb 28, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/5b0028e1e75e1ee0eea63ba78cb3160d49c1f3a3
a094ac1 add types to git.util and git.__init__ Yobmod Mar 1, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/a094ac1808f7c5fa0653ac075074bb2232223ac1
71e28b8 add types to git.db and git.exc Yobmod Mar 1, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/71e28b8e2ac1b8bc8990454721740b2073829110
2fd9f6e add types to git.compat and git.diff Yobmod Mar 2, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/2fd9f6ee5c8b4ae4e01a40dc398e2768d838210d
6752fad add initial types to remote.py Yobmod May 3, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/6752fad0e93d1d2747f56be30a52fea212bd15d6
18b75d9 copy sys.version checks for literal and final to git.types Yobmod May 3, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/18b75d9e63f513e972cbc09c06b040bcdb15aa05
a1fa850 update type of FetchInfo.refresh() to use Literal Yobmod May 3, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/a1fa8506d177fa49552ffa84527c35d32f193abe
c08f592 add types to PushInfo.__init__() .remote_ref() and .old_commit() Yobmod May 3, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/c08f592cc0238054ec57b6024521a04cf70e692f
f8e7a7d Merge branch 'main' into addtypes Yobmod May 3, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/f8e7a7df78fb98314ba5a0a98f4600454a6c3953
baec2e2 make progress types more general Yobmod May 3, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/baec2e293158ccffd5657abf4acdae18256c6c90
8611488 Merge branch 'addtypes' of https://github.com/Yobmod/GitPython into a… Yobmod May 3, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/86114886ae8c2e1a9c09fdc145269089f281d212
e37ebaa change a type (Commit) to a forward ref Yobmod May 3, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/e37ebaa5407408ee73479a12ada0c4a75e602092
f97d378 change flags type to int Yobmod May 3, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/f97d37881d50da8f9702681bc1928a8d44119e88
90fefb0 add overloads to to_progress_instance() Yobmod May 3, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/90fefb0a8cc5dc793d40608e2d6a2398acecef12
559ddb3 add types to _from_line() Yobmod May 3, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/559ddb3b60e36a1b9c4a145d7a00a295a37d46a8
1b16037 second pass of adding types Yobmod May 3, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/1b16037a4ff17f0e25add382c3550323373c4398
96f8f17 fix Repo forward ref Yobmod May 3, 2021 https://github.com/gitpython-developers/GitPython/pull/1229/commits/96f8f17d5d63c0e0c044ac3f56e94a1aa2e45ec3
Clear filters https://github.com/gitpython-developers/GitPython/pull/1229/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/1229/files
Please reload this pagehttps://github.com/gitpython-developers/GitPython/pull/1229/files
symbolic.py https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-72d42177f0e8535634711b5de0390d5bc81dbedab1fbac6547e5b9ab3b03eb9a
remote.py https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
types.py https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-7b61e3545630e0a388178487cb7018546b39eb3f92e6553c18c3c3e11300cfda
git/refs/symbolic.pyhttps://github.com/gitpython-developers/GitPython/pull/1229/files#diff-72d42177f0e8535634711b5de0390d5bc81dbedab1fbac6547e5b9ab3b03eb9a
View file https://github.com/gitpython-developers/GitPython/blob/96f8f17d5d63c0e0c044ac3f56e94a1aa2e45ec3/git/refs/symbolic.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/1229/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-72d42177f0e8535634711b5de0390d5bc81dbedab1fbac6547e5b9ab3b03eb9a
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-72d42177f0e8535634711b5de0390d5bc81dbedab1fbac6547e5b9ab3b03eb9a
git/remote.pyhttps://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
View file https://github.com/gitpython-developers/GitPython/blob/96f8f17d5d63c0e0c044ac3f56e94a1aa2e45ec3/git/remote.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/1229/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-498082829601479324d7f95e72bd35bafafe74be1b0d8e1b7a42e181b08f3639
git/types.pyhttps://github.com/gitpython-developers/GitPython/pull/1229/files#diff-7b61e3545630e0a388178487cb7018546b39eb3f92e6553c18c3c3e11300cfda
View file https://github.com/gitpython-developers/GitPython/blob/96f8f17d5d63c0e0c044ac3f56e94a1aa2e45ec3/git/types.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/gitpython-developers/GitPython/pull/1229/{{ revealButtonHref }}
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-7b61e3545630e0a388178487cb7018546b39eb3f92e6553c18c3c3e11300cfda
https://github.com/gitpython-developers/GitPython/pull/1229/files#diff-7b61e3545630e0a388178487cb7018546b39eb3f92e6553c18c3c3e11300cfda
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.