Fix IndexFile.commit `parent_commits` annotation · gitpython-developers/GitPython@b4b6e1e · GitHub
Skip to content

Commit b4b6e1e

Browse files
committed
Fix IndexFile.commit parent_commits annotation
This changes that parameter's annotation to be equivalent to the annotation of the corresponding Commit.create_from_tree parameter. It had been annotated as the old Commit_ish type, but it passes that argument to Commit.create_from_tree, and it also refers to that method in its docstring for usage. Commit.create_from_tree annotates this argument as an optional list of Commit objects, and if the objects obtained when it iterates them are not Commit instances, then an exception is raised. Even if being able to pass other commit-ish things (or references, strings, etc.) is desirable, that does not currently work. This also improves sorting (and grouping style) of imports in that file (which were being changed already to no longer import the old Commit_ish type).
1 parent ab27827 commit b4b6e1e

1 file changed

Lines changed: 15 additions & 28 deletions

File tree

git/index/base.py

Lines changed: 15 additions & 28 deletions

0 commit comments

Comments
 (0)