We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 65342ae commit 96221e1Copy full SHA for 96221e1
pdoc/__init__.py
@@ -1354,8 +1354,12 @@ def maybe_replace_reprs(a):
1354
try:
1355
a = a.__origin__[args]
1356
except TypeError:
1357
+ # XXX: Python 3.10-only: Convert to list since _CallableGenericAlias.__new__
1358
+ # currently cannot have tuples as arguments.
1359
+ args_in = list(args[:-1])
1360
+ arg_out = args[-1]
1361
# collections.abc.Callable takes "([in], out)"
- a = a.__origin__[(args[:-1], args[-1])]
1362
+ a = a.__origin__[(args_in, arg_out)]
1363
# Recurse into lists
1364
if isinstance(a, (list, tuple)):
1365
return type(a)(map(maybe_replace_reprs, a))
0 commit comments