diff --git a/pyproject.toml b/pyproject.toml index 3f804296..d9cc5c4d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -200,6 +200,11 @@ ignore_errors = true module = ["wrapt", "msgspec"] ignore_missing_imports = true +# remove when dropping python 3.7 +[[tool.mypy.overrides]] +module = ["psygnal._signal"] +warn_unused_ignores = false + # https://coverage.readthedocs.io/en/6.4/config.html [tool.coverage.report] exclude_lines = [ diff --git a/src/psygnal/_signal.py b/src/psygnal/_signal.py index 7bbf540e..3c74763a 100644 --- a/src/psygnal/_signal.py +++ b/src/psygnal/_signal.py @@ -492,7 +492,9 @@ def _wrapper( extra = f"- Slot types {slot_sig} do not match types in signal." self._raise_connection_error(slot, extra) - cb = weak_callback( + # this type ignore is only needed to build mypyc on pythong 3.7 + # can be removed when we drop support for 3.7 + cb = weak_callback( # type: ignore slot, max_args=max_args, finalize=self._try_discard,