From 701be93cfe572f8bbc4aa9d57d48a56638c7dcb2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gr=C3=BCter?= Date: Tue, 1 Sep 2026 11:05:55 +0200 Subject: [PATCH 1/2] Fix incompatible supertype with click HelpFormatter MyPy's stubtest reports the following ``` error: not checking stubs due to mypy build errors: C:\hostedtoolcache\windows\Python\3.14.6\x64\Lib\site-packages\docstub-stubs\_cli_help.pyi:35: error: Argument 1 of "write_dl" is incompatible with supertype "click.formatting.HelpFormatter"; supertype defines the argument type as "Iterable[tuple[str, str]]" [override] ``` --- src/docstub-stubs/_cli_help.pyi | 4 ++-- src/docstub/_cli_help.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/docstub-stubs/_cli_help.pyi b/src/docstub-stubs/_cli_help.pyi index 1d6cefb..dc7a968 100644 --- a/src/docstub-stubs/_cli_help.pyi +++ b/src/docstub-stubs/_cli_help.pyi @@ -3,7 +3,7 @@ import logging import os import re -from collections.abc import Sequence +from collections.abc import Iterable from typing import IO, Any, ClassVar import click @@ -32,7 +32,7 @@ class HelpFormatter(click.formatting.HelpFormatter): def __init__(self, *args: Any, **kwargs: Any) -> None: ... def write_dl( self, - rows: Sequence[tuple[str, str]], + rows: Iterable[tuple[str, str]], *args: Any, **kwargs: Any, ) -> None: ... diff --git a/src/docstub/_cli_help.py b/src/docstub/_cli_help.py index ddc64a2..8462692 100644 --- a/src/docstub/_cli_help.py +++ b/src/docstub/_cli_help.py @@ -95,7 +95,7 @@ def write_dl( Parameters ---------- - rows : Sequence[tuple[str, str]] + rows : Iterable[tuple[str, str]] *args, **kwargs : Any """ if not rows[0][0].strip().startswith("-"): From 368b98c299be989197fef75e0688fe192ee29075 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gr=C3=BCter?= Date: Tue, 1 Sep 2026 11:06:31 +0200 Subject: [PATCH 2/2] Increase verbosity of basedpyright in CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67faa1b..1572693 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -117,4 +117,4 @@ jobs: - name: Check tests/ with basedpyright run: | - basedpyright tests/ + basedpyright --level=warning --stats tests/