Skip to content

Commit 578a3b6

Browse files
Update Misc/NEWS.d/next/Library/2026-03-11-14-14-27.gh-issue-145821.xWSIjR.rst
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
1 parent e757e27 commit 578a3b6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
Fix :exc:`TypeError` in :mod:`optparse` when ``callback_kwargs`` is a
2-
non-dict (e.g. a tuple). The validation in ``Option._check_callback`` now
3-
correctly raises :exc:`~optparse.OptionError`.
1+
:mod:`optparse`: raise :exc:`~optparse.OptionError` instead of :exc:`TypeError`
2+
when ``callback_kwargs`` is not a dictionary.

0 commit comments

Comments
 (0)