Title: Add types to git/config.py by Yobmod · Pull Request #1234 · gitpython-developers/GitPython · GitHub
Open Graph Title: Add types to git/config.py by Yobmod · Pull Request #1234 · gitpython-developers/GitPython
X Title: Add types to git/config.py by Yobmod · Pull Request #1234 · gitpython-developers/GitPython
Description: Adding types to config.py and cmd.py Functions annotated all listed in commit titles. I had to use a few casts in this one, due to the use of hassattr to distinguish strings from file objects. If anyone knows a better way, let me know. (Its an open issue on mypy, and Guido recomends rewriting and doing type checks - a job for the future!) python/mypy#1424 (comment) Some minor logic changes, all for type checks (e.g. because str is a subtype of Sequence, have to check for it before other sequences) or to try to separate strings from bytes. All check pass and mypy happy. I also ran some basic scripts against it, and no errors. Might be worth cutting a release after this PR, in case an errors are hiding? (No rush, I only submitted this one so fast as it was waiting in my fork already)
Open Graph Description: Adding types to config.py and cmd.py Functions annotated all listed in commit titles. I had to use a few casts in this one, due to the use of hassattr to distinguish strings from file objects. If a...
X Description: Adding types to config.py and cmd.py Functions annotated all listed in commit titles. I had to use a few casts in this one, due to the use of hassattr to distinguish strings from file objects. If a...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1234
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:889ab1e4-b11a-7b59-54a8-a1bbd726394c |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | 8AE0:A5047:AA32D5:EC42FA:6968A904 |
| html-safe-nonce | b438d7275f22d08923c1e574befcc735c169dc9fe82877d413591d51c5949daa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QUUwOkE1MDQ3OkFBMzJENTpFQzQyRkE6Njk2OEE5MDQiLCJ2aXNpdG9yX2lkIjoiNjYxODk4NzkwNTY1ODk1NjAzNiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | cf2dd99e3b8d49a8d95eb548c307f73407987d0ebed9fcfd0e99d098d7c6632d |
| hovercard-subject-tag | pull_request:643327250 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/gitpython-developers/GitPython/pull/1234/checks |
| twitter:image | https://avatars.githubusercontent.com/u/22235459?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/22235459?s=400&v=4 |
| og:image:alt | Adding types to config.py and cmd.py Functions annotated all listed in commit titles. I had to use a few casts in this one, due to the use of hassattr to distinguish strings from file objects. If a... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | fdc7c66bd36a6c12eb8e771e806db863266e573fc299e77f27505a768d4f8a98 |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3223a6503d318917691422cdadfbe16cd8fb21e5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width