Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pygit2/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@


def init_repository(
path: str | bytes | os.PathLike | None,
path: str | bytes | os.PathLike[str] | os.PathLike[bytes] | None,
bare: bool = False,
flags: enums.RepositoryInitFlag = enums.RepositoryInitFlag.MKPATH,
mode: int | enums.RepositoryInitMode = enums.RepositoryInitMode.SHARED_UMASK,
Expand Down Expand Up @@ -444,8 +444,8 @@ def init_repository(


def clone_repository(
url: str | bytes | os.PathLike,
path: str | bytes | os.PathLike,
url: str | bytes | os.PathLike[str] | os.PathLike[bytes],
path: str | bytes | os.PathLike[str] | os.PathLike[bytes],
bare: bool = False,
repository: typing.Callable | None = None,
remote: typing.Callable | None = None,
Expand Down
2 changes: 1 addition & 1 deletion pygit2/_pygit2.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ class Repository:
def references_iterator_init(self) -> Iterator[Reference]: ...
def references_iterator_next(
self,
iter: Iterator,
iter: Iterator[T],
references_return_type: ReferenceFilter = ReferenceFilter.ALL,
) -> Reference: ...
def reset(self, oid: _OidArg, reset_type: ResetMode) -> None: ...
Expand Down
4 changes: 2 additions & 2 deletions pygit2/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def maybe_string(ptr: 'char_pointer | None') -> str | None:

@overload
def to_bytes(
s: str | bytes | os.PathLike[str],
s: str | bytes | os.PathLike[str] | os.PathLike[bytes],
encoding: str = 'utf-8',
errors: str = 'strict',
) -> bytes: ...
Expand All @@ -64,7 +64,7 @@ def to_bytes(
errors: str = 'strict',
) -> Union['ffi.NULL_TYPE']: ...
def to_bytes(
s: Union[str, bytes, 'ffi.NULL_TYPE', os.PathLike[str], None],
s: Union[str, bytes, 'ffi.NULL_TYPE', os.PathLike[str], os.PathLike[bytes], None],
encoding: str = 'utf-8',
errors: str = 'strict',
) -> Union[bytes, 'ffi.NULL_TYPE']:
Expand Down
Loading