#4048 new defect

Fix the `cli_options.stdout` pattern

Reported by: exarkun Owned by:
Priority: normal Milestone: undecided
Component: unknown Version: n/a
Keywords: Cc:
Launchpad Bug:

Description

In tor_provider and i2p_provider, https://github.com/tahoe-lafs/tahoe-lafs/pull/1283 introduced a couple type ignore comments to suppress the mypy error now present in those places due to new type annotations. The error complains about Options having no stdout attribute. It's true the type doesn't generally, but runner.py puts one there.

Instead of dynamically adding extra attributes to Options, the code should either pass stdout (and stderr I think?) separately or introduce a new type specifically for representing an options value and some more stuff.

Change History (1)

comment:1 Changed at 2023-07-20T18:19:58Z by exarkun

Also, this "add a stdout/stderr" pattern appears elsewhere - but in places mypy isn't checking yet.

Note: See TracTickets for help on using tickets.