typing fixes - DiffIndex generic type and IndexFile items by Andrej730 · Pull Request #1925 · gitpython-developers/GitPython

added 2 commits

June 3, 2024 00:32
Error before commit:

path: os.PathLike = ...
repo = git.Repo(path_dir)
repo.index.add(path)
Example before this commit:

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]