Skip to content

Commit 4cfdb36

Browse files
authored
Fix a type error in generics (#1913)
The function says it returns an `int`, but used `pass` so returned `None`. Fix by returning the `a` argument which is of type `int`.
1 parent 0fed553 commit 4cfdb36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/spec/generics.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1071,7 +1071,7 @@ outer ``Callable``. This has the following semantics:
10711071
.. code-block::
10721072
10731073
def a_int_b_str(a: int, b: str) -> int:
1074-
pass
1074+
return a
10751075
10761076
twice(a_int_b_str, 1, "A") # Accepted
10771077

0 commit comments

Comments
 (0)