Skip to content

Commit bcd60f4

Browse files
committed
Fix mypy
1 parent 7ab18e0 commit bcd60f4

2 files changed

Lines changed: 4 additions & 8 deletions

File tree

pygit2/callbacks.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
from collections.abc import Callable, Generator
6767
from contextlib import contextmanager
6868
from functools import wraps
69-
from typing import TYPE_CHECKING, Optional, ParamSpec, TypeVar
69+
from typing import TYPE_CHECKING, Any, Optional, ParamSpec, TypeVar
7070

7171
# pygit2
7272
from ._pygit2 import DiffFile, Oid
@@ -81,7 +81,6 @@
8181
if TYPE_CHECKING:
8282
from pygit2._libgit2.ffi import GitProxyOptionsC
8383

84-
from ._pygit2 import CloneOptions, PushOptions
8584
from .remotes import PushUpdate, TransferProgress
8685
#
8786
# The payload is the way to pass information from the pygit2 API, through
@@ -92,7 +91,7 @@
9291
class Payload:
9392
repository: Callable | None
9493
remote: Callable | None
95-
clone_options: 'CloneOptions'
94+
clone_options: Any
9695

9796
def __init__(self, **kw: object) -> None:
9897
for key, value in kw.items():
@@ -125,7 +124,7 @@ class RemoteCallbacks(Payload):
125124
RemoteCallbacks(certificate=certificate).
126125
"""
127126

128-
push_options: 'PushOptions'
127+
push_options: Any
129128

130129
def __init__(
131130
self,

test/test_refdb_backend.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
"""Tests for Refdb objects."""
2727

28-
from collections.abc import Generator, Iterator
28+
from collections.abc import Generator
2929
from pathlib import Path
3030

3131
import pytest
@@ -77,9 +77,6 @@ def has_log(self, ref_name: str) -> bool:
7777
def ensure_log(self, ref_name: str) -> bool:
7878
return self.source.ensure_log(ref_name)
7979

80-
def __iter__(self) -> Iterator[Reference]:
81-
return iter(self.source)
82-
8380

8481
@pytest.fixture
8582
def repo(testrepo: Repository) -> Generator[Repository, None, None]:

0 commit comments

Comments
 (0)