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

repo.index.add() first argument type accepts os.PathLike but code raises TypeError #1382

Closed
@itsayellow

Description

@itsayellow

In the docs and in the code types, the first argument forrepo.index.add() isSequence[Union[str, os.PathLike, git.objects.blob.Blob, git.index.typ.BaseIndexEntry, Submodule]].
However, actually trying to submit a list of Paths to this argument results in a TypeError, as it seems the code inside_preprocess_add_items does not handle Paths.

I think this could be fixed by changing line 611 inside of_preprocess_add_items inbase.py to:

 if isinstance(item, str) or isinstance(item, os.PathLike):

ifisinstance(item,str):

Since_to_relative_path() already accepts pathlike arguments.

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