test: Add misc.print to mypy parsing

Adds `print.py` to mypy config and fixes an unused ignore.

Signed-off-by: Freya Gustavsson <freya@venefilyn.se>
This commit is contained in:
Freya Gustavsson 2026-04-17 12:28:19 +02:00 committed by Jelle van der Waa
parent 27397bae8d
commit b37097f941
2 changed files with 2 additions and 1 deletions

View file

@ -69,6 +69,7 @@ module = [
'cockpit.channels.pcp',
'cockpit.channels.stream',
'cockpit.channels.trivial',
'cockpit.misc.print',
'cockpit.jsonutil',
'cockpit.packages',
'cockpit.peer',

View file

@ -92,7 +92,7 @@ class Printer:
if headers is not None:
our_headers.update(headers)
# mypy is right: kwargs could include `done` or `method`, but codifying that is really awkward
self.http(path, internal='packages', channel=channel, headers=our_headers, **kwargs) # type: ignore[arg-type]
self.http(path, internal='packages', channel=channel, headers=our_headers, **kwargs)
def spawn(self, *args: str, channel: Optional[str] = None, **kwargs: object) -> None:
"""Open a stream channel with a spawned command"""