Skip to content

Commit 58270d3

Browse files
committed
needed to add type ignores
1 parent e433a4c commit 58270d3

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pygit2/callbacks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ def _checkout_notify_cb(
718718
pyworkdir = DiffFile.from_c(ptr_to_bytes(workdir))
719719

720720
try:
721-
data.checkout_notify(why, pypath, pybaseline, pytarget, pyworkdir)
721+
data.checkout_notify(why, pypath, pybaseline, pytarget, pyworkdir) # type: ignore[arg-type]
722722
except Passthrough:
723723
# Unlike most other operations with optional callbacks, checkout
724724
# doesn't support the GIT_PASSTHROUGH return code, so we must bypass
@@ -733,7 +733,7 @@ def _checkout_notify_cb(
733733

734734
@libgit2_callback_void
735735
def _checkout_progress_cb(path, completed_steps, total_steps, data: CheckoutCallbacks):
736-
data.checkout_progress(maybe_string(path), completed_steps, total_steps)
736+
data.checkout_progress(maybe_string(path), completed_steps, total_steps) # type: ignore[arg-type]
737737

738738

739739
def _git_checkout_options(

pygit2/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
from .ffi import C, ffi
4343

4444
if TYPE_CHECKING:
45-
from ._libgit2.ffi import ArrayC, GitStrrayC, char
45+
from ._libgit2.ffi import ArrayC, GitStrrayC, char, char_pointer
4646

4747

48-
def maybe_string(ptr):
48+
def maybe_string(ptr: char_pointer) -> str | None:
4949
if not ptr:
5050
return None
5151

0 commit comments

Comments
 (0)