mirror of
https://github.com/python/cpython.git
synced 2024-12-16 21:34:44 +08:00
Fix a typo in docs for typing.Concatenate (#24169)
Return param spec should be R, not T
This commit is contained in:
parent
11ef53aefb
commit
68e1f259be
@ -707,7 +707,7 @@ These can be used as types in annotations using ``[]``, each having a unique syn
|
||||
def with_lock(f: Callable[Concatenate[Lock, P], R]) -> Callable[P, R]:
|
||||
'''A type-safe decorator which provides a lock.'''
|
||||
global my_lock
|
||||
def inner(*args: P.args, **kwargs: P.kwargs) -> T:
|
||||
def inner(*args: P.args, **kwargs: P.kwargs) -> R:
|
||||
# Provide the lock as the first argument.
|
||||
return f(my_lock, *args, **kwargs)
|
||||
return inner
|
||||
|
Loading…
Reference in New Issue
Block a user