Skip to content

Commit fbce76d

Browse files
committed
Do not break exception chain unnecessarily
1 parent 17dfb36 commit fbce76d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/functools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -992,7 +992,7 @@ def register(cls, func=None, _func_is_method=False):
992992
raise TypeError(
993993
f"Invalid first argument to `register()`: {func!r} "
994994
f"does not accept positional arguments."
995-
) from None
995+
)
996996

997997
# only import typing if annotation parsing is necessary
998998
from typing import get_type_hints

0 commit comments

Comments
 (0)