Skip to content

Commit

Permalink
fix mypy issues
Browse files Browse the repository at this point in the history
  • Loading branch information
shcheklein authored Oct 22, 2024
1 parent b2c498d commit 5a9906c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scmrepo/git/backend/pygit2/filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import logging
from typing import TYPE_CHECKING, Callable, Optional

from pygit2 import GIT_FILTER_CLEAN, Filter, Passthrough
from pygit2 import GIT_FILTER_CLEAN, Filter, Passthrough # type: ignore[attr-defined]

if TYPE_CHECKING:
from pygit2 import FilterSource
Expand All @@ -17,7 +17,7 @@ def __init__(self, *args, **kwargs):
self._smudge_buf: Optional[io.BytesIO] = None
self._smudge_root: Optional[str] = None

def check(self, src: "FilterSource", attr_values: list[str]):
def check(self, src: "FilterSource", attr_values: list[str | None]):
if attr_values[0] == "lfs" and src.mode != GIT_FILTER_CLEAN:
self._smudge_buf = io.BytesIO()
self._smudge_root = src.repo.workdir or src.repo.path
Expand Down

0 comments on commit 5a9906c

Please sign in to comment.