Skip to content

Commit 8d86f9e

Browse files
committed
Break the exception chain
1 parent ebdb68d commit 8d86f9e

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
@@ -901,7 +901,7 @@ def _get_dispatch_param_name(func, *, skip_first_param=False):
901901
raise TypeError(
902902
f"Invalid first argument to `register()`: function {func!r}"
903903
f"does not accept positional arguments."
904-
)
904+
) from None
905905

906906
def _get_dispatch_annotation(func, param):
907907
import annotationlib, typing

0 commit comments

Comments
 (0)