diff --git a/docs/changelog/3523.bugfix.rst b/docs/changelog/3523.bugfix.rst new file mode 100644 index 000000000..3052d877e --- /dev/null +++ b/docs/changelog/3523.bugfix.rst @@ -0,0 +1 @@ +Fix ``TypeError`` for ``HelpFormatter`` with Python 3.14 diff --git a/src/tox/config/cli/parser.py b/src/tox/config/cli/parser.py index 87629ae49..904ff7aad 100644 --- a/src/tox/config/cli/parser.py +++ b/src/tox/config/cli/parser.py @@ -95,8 +95,8 @@ def parse_args( # type: ignore[override] # avoid defining all overloads class HelpFormatter(ArgumentDefaultsHelpFormatter): """A help formatter that provides the default value and the source it comes from.""" - def __init__(self, prog: str) -> None: - super().__init__(prog, max_help_position=30, width=240) + def __init__(self, prog: str, **kwargs: Any) -> None: + super().__init__(prog, max_help_position=30, width=240, **kwargs) def _get_help_string(self, action: Action) -> str | None: text: str = super()._get_help_string(action) or ""