Skip to content

Commit

Permalink
Fix a type error in generics (#1913)
Browse files Browse the repository at this point in the history
The function says it returns an `int`, but used `pass` so returned `None`. Fix by returning the `a` argument which is of type `int`.
  • Loading branch information
ndmitchell authored Jan 29, 2025
1 parent 0fed553 commit 4cfdb36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/spec/generics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1071,7 +1071,7 @@ outer ``Callable``. This has the following semantics:
.. code-block::
def a_int_b_str(a: int, b: str) -> int:
pass
return a
twice(a_int_b_str, 1, "A") # Accepted
Expand Down

0 comments on commit 4cfdb36

Please sign in to comment.