Skip to content

Commit 19126da

Browse files
Fix custom HelpFormatter for Python 3.14 (#3524)
Co-authored-by: Bernát Gábor <gaborjbernat@gmail.com>
1 parent f082f80 commit 19126da

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/changelog/3523.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix ``TypeError`` for ``HelpFormatter`` with Python 3.14

src/tox/config/cli/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ def parse_args( # type: ignore[override] # avoid defining all overloads
9595
class HelpFormatter(ArgumentDefaultsHelpFormatter):
9696
"""A help formatter that provides the default value and the source it comes from."""
9797

98-
def __init__(self, prog: str) -> None:
99-
super().__init__(prog, max_help_position=30, width=240)
98+
def __init__(self, prog: str, **kwargs: Any) -> None:
99+
super().__init__(prog, max_help_position=30, width=240, **kwargs)
100100

101101
def _get_help_string(self, action: Action) -> str | None:
102102
text: str = super()._get_help_string(action) or ""

0 commit comments

Comments
 (0)