Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Wrong type annotation onIndex.commit forparent_commits #1866

Closed
@mshonichev

Description

@mshonichev

WithGitPython==3.1.42 one can observe following annotation ofparent_commits argument toIndexFile.commit ([1]):

...parent_commits: Union[Commit_ish, None] = None,...

which is obviously not correct, because that argument just passed unmodified downwards toCommit.create_from_tree, which has following annotation instead ([2]):

parent_commits: Union[None, List["Commit"]] = None

That leads to nasty Mypy warnings when one's trying to useIndexFile.commit with anything different thanNone.


[1] -https://github.com/gitpython-developers/GitPython/blob/3.1.42/git/index/base.py#L1080
[2] -https://github.com/gitpython-developers/GitPython/blob/3.1.42/git/objects/commit.py#L506

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp