You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just happen to notice that in GitPython == 3.1.27 the static typing pip mypy fails to recognize the **kwargs of Remote.fetch() in remote.py. This happens because the kwargs argument is typed as Any, which is plausible but may be narrowed down to e.g. Union[None, Dict[str, int, bool]]. For the correct list of possible types we'd need to check docs at git-fetch.
Use case is the following code snippet:
deffetch_all(self, repository: git.Repo) ->List[git.FetchInfo]:
fetch_kwargs= {'tags': True, 'force': True, 'prune': True, 'prune-tags': True}
origin_server=repository.remotes.originorigin_server.fetch(**fetch_kwargs) # Note: mypy does not recognize kwargs because GitPython does type it as Anyfetch_info_list=origin_server.pull()
returnfetch_info_list
(Code above is my custom code and not part of this project!)
Edit: Using mypy==0.971 and mypy-extensions==0.4.3. Not sure if mypy should ignore this at least we can help it find a potential type.
The text was updated successfully, but these errors were encountered:
Thanks for acknowledging this issue. I'll try to come up with something but it might take some time.
Edit: I checked out the repository and noticed some tests failing but i am using Python 3.11 so that might be bad. Not sure if i can start on this issue.
Just happen to notice that in
GitPython == 3.1.27
the static typing pip mypy fails to recognize the**kwargs
ofRemote.fetch()
inremote.py
. This happens because the kwargs argument is typed as Any, which is plausible but may be narrowed down to e.g.Union[None, Dict[str, int, bool]]
. For the correct list of possible types we'd need to check docs at git-fetch.Use case is the following code snippet:
(Code above is my custom code and not part of this project!)
Edit: Using
mypy==0.971
andmypy-extensions==0.4.3
. Not sure if mypy should ignore this at least we can help it find a potential type.The text was updated successfully, but these errors were encountered: