From 44bac2edd52a45397f1538bf2925ddedece65bf4 Mon Sep 17 00:00:00 2001 From: kbaikov Date: Thu, 7 Aug 2025 10:18:36 +0200 Subject: [PATCH] Add types-cffi to test requirements This hopefully helps with future typings. --- pygit2/_run.py | 2 +- requirements-test.txt | 1 + setup.py | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pygit2/_run.py b/pygit2/_run.py index bb8238c9..f64ba0fa 100644 --- a/pygit2/_run.py +++ b/pygit2/_run.py @@ -33,7 +33,7 @@ from pathlib import Path # Import from cffi -from cffi import FFI # type: ignore +from cffi import FFI # Import from pygit2 try: diff --git a/requirements-test.txt b/requirements-test.txt index a1071106..15e9ecf8 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,3 +1,4 @@ pytest pytest-cov mypy +types-cffi diff --git a/setup.py b/setup.py index 7506d623..ff904fa9 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ # Import setuptools before distutils to avoid user warning import os import sys -from distutils import log +from distutils import log # type: ignore[attr-defined] from distutils.command.build import build from distutils.command.sdist import sdist from pathlib import Path @@ -129,7 +129,7 @@ def run(self): # On Windows we package up the dlls with the plugin. if os.name == 'nt': - cmdclass['build'] = BuildWithDLLs + cmdclass['build'] = BuildWithDLLs # type: ignore[assignment] src = __dir__ / 'src' pygit2_exts = [str(path) for path in sorted(src.iterdir()) if path.suffix == '.c']