Title: typing fixes - DiffIndex generic type and IndexFile items by Andrej730 · Pull Request #1925 · gitpython-developers/GitPython · GitHub
Open Graph Title: typing fixes - DiffIndex generic type and IndexFile items by Andrej730 · Pull Request #1925 · gitpython-developers/GitPython
X Title: typing fixes - DiffIndex generic type and IndexFile items by Andrej730 · Pull Request #1925 · gitpython-developers/GitPython
Description: Example issue with DiffIndex: repo = git.Repo(path_dir) diff = repo.index.diff(None) modified_files = [d for d in repo.index.diff(None)] reveal_type(modified_files) # list[Unknown] instead of list[Diff] Example issue with IndexFile: path: os.PathLike = ... repo = git.Repo(path_dir) # Argument of type "PathLike[Unknown]" # cannot be assigned to parameter "items" of type "Sequence[git.types.PathLike | Blob | BaseIndexEntry | Submodule]" in function "add" # "PathLike[Unknown]" is incompatible with "Sequence[git.types.PathLike | Blob | BaseIndexEntry | Submodule]" repo.index.add(path)
Open Graph Description: Example issue with DiffIndex: repo = git.Repo(path_dir) diff = repo.index.diff(None) modified_files = [d for d in repo.index.diff(None)] reveal_type(modified_files) # list[Unknown] instead of list[...
X Description: Example issue with DiffIndex: repo = git.Repo(path_dir) diff = repo.index.diff(None) modified_files = [d for d in repo.index.diff(None)] reveal_type(modified_files) # list[Unknown] instead of list[...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1925
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:78448b66-585e-00da-4c1f-396846d773ea |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | BEF2:2A268:157AB36:1DFF148:6968B63E |
| html-safe-nonce | d4442377c038a5eac418fc0d2cbf4c17bfe6f13029a4963e4d8a81952cb30754 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRUYyOjJBMjY4OjE1N0FCMzY6MURGRjE0ODo2OTY4QjYzRSIsInZpc2l0b3JfaWQiOiI4MDQ2NzI0MDkwOTk2MjQxOTgyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4c6ab055155dab273b615271ff91a0acf182240f8851641ede9676f8d3cf9827 |
| hovercard-subject-tag | pull_request:1899685215 |
| 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/1925/checks |
| twitter:image | https://avatars.githubusercontent.com/u/9417531?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/9417531?s=400&v=4 |
| og:image:alt | Example issue with DiffIndex: repo = git.Repo(path_dir) diff = repo.index.diff(None) modified_files = [d for d in repo.index.diff(None)] reveal_type(modified_files) # list[Unknown] instead of list[... |
| 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