Skip to content

_pygit2 typing: Mark optional parameters as optional #1214

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 3, 2023
Merged
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/_pygit2.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Iterator, Literal, overload
from typing import Iterator, Literal, Optional, overload
from io import IOBase
from . import Index, Submodule

Expand Down Expand Up @@ -484,7 +484,7 @@ class Repository:
def create_blob_fromiobase(self, iobase: IOBase) -> Oid: ...
def create_blob_fromworkdir(self, path: str) -> Oid: ...
def create_branch(self, name: str, commit: Commit, force = False) -> Branch: ...
def create_commit(self, reference_name: str, author: Signature, committer: Signature, message: str | bytes, tree: _OidArg, parents: list[_OidArg], encoding: str = ...) -> Oid: ...
def create_commit(self, reference_name: Optional[str], author: Signature, committer: Signature, message: str | bytes, tree: _OidArg, parents: list[_OidArg], encoding: str = ...) -> Oid: ...
def create_commit_string(self, author: Signature, committer: Signature, message: str | bytes, tree: _OidArg, parents: list[_OidArg], encoding: str = ...) -> Oid: ...
def create_commit_with_signature(self, content: str, signature: str, signature_field: Optional[str] = None) -> Oid: ...
def create_note(self, message: str, author: Signature, committer: Signature, annotated_id: str, ref: str = "refs/notes/commits", force: bool = False) -> Oid: ...
Expand Down Expand Up @@ -539,7 +539,7 @@ class Signature:
raw_email: bytes
raw_name: bytes
time: int
def __init__(self, name: str, email: str, time: int, offset: int, encoding: Optional[str] = None) -> None: ...
def __init__(self, name: str, email: str, time: int = -1, offset: int = 0, encoding: Optional[str] = None) -> None: ...
def __eq__(self, other) -> bool: ...
def __ge__(self, other) -> bool: ...
def __gt__(self, other) -> bool: ...
Expand Down