|
9 | 9 |
|
10 | 10 |
|
11 | 11 | def parse_cli_ctx(parser: configparser.SectionProxy) -> dict[str, Any]:
|
12 |
| - formatter_settings: dict[str, str | int] = { |
| 12 | + formatter_settings: dict[str, str | int | None] = { |
13 | 13 | "indent_increment": int(parser["indent_increment"]),
|
14 | 14 | "width": int(parser["width"]),
|
15 | 15 | "col1_max_width": int(parser["col1_max_width"]),
|
@@ -37,22 +37,24 @@ def parse_cli_ctx(parser: configparser.SectionProxy) -> dict[str, Any]:
|
37 | 37 | if theme is None:
|
38 | 38 | formatter = HelpFormatter.settings(
|
39 | 39 | theme=HelpTheme(**theme_settings),
|
40 |
| - **formatter_settings, # type: ignore[arg-type] |
| 40 | + **formatter_settings, |
41 | 41 | )
|
42 | 42 | elif theme.lower() == "dark":
|
43 | 43 | formatter = HelpFormatter.settings(
|
44 | 44 | theme=HelpTheme.dark().with_(**theme_settings),
|
45 |
| - **formatter_settings, # type: ignore[arg-type] |
| 45 | + **formatter_settings, |
46 | 46 | )
|
47 | 47 | elif theme.lower() == "light":
|
48 | 48 | formatter = HelpFormatter.settings(
|
49 | 49 | theme=HelpTheme.light().with_(**theme_settings),
|
50 |
| - **formatter_settings, # type: ignore[arg-type] |
| 50 | + **formatter_settings, |
51 | 51 | )
|
52 | 52 |
|
53 |
| - return Context.settings( |
| 53 | + return_val: dict[str, Any] = Context.settings( |
54 | 54 | align_option_groups=parser["align_option_groups"].lower() == "true",
|
55 | 55 | align_sections=parser["align_sections"].lower() == "true",
|
56 | 56 | show_constraints=True,
|
57 | 57 | formatter_settings=formatter,
|
58 | 58 | )
|
| 59 | + |
| 60 | + return return_val |
0 commit comments