parent
99bffed983
commit
4b4ca0c489
@ -0,0 +1,29 @@
|
||||
From ec30ecf89f8788da139f73d9140de66fc21848d5 Mon Sep 17 00:00:00 2001
|
||||
From: Hugo van Kemenade <hugovk@users.noreply.github.com>
|
||||
Date: Thu, 30 Sep 2021 15:21:40 +0300
|
||||
Subject: [PATCH] Replace deprecated inspect.formatargspec with
|
||||
inspect.signature
|
||||
|
||||
---
|
||||
botocore/docs/method.py | 8 +-------
|
||||
1 file changed, 1 insertion(+), 7 deletions(-)
|
||||
|
||||
diff --git a/botocore/docs/method.py b/botocore/docs/method.py
|
||||
index dbadd94313..e75a0e8e5c 100644
|
||||
--- a/botocore/docs/method.py
|
||||
+++ b/botocore/docs/method.py
|
||||
@@ -96,13 +96,7 @@ def document_custom_signature(section, name, method,
|
||||
:param exclude: The names of the parameters to exclude from
|
||||
documentation.
|
||||
"""
|
||||
- argspec = inspect.getfullargspec(method)
|
||||
- signature_params = inspect.formatargspec(
|
||||
- args=argspec.args[1:],
|
||||
- varargs=argspec.varargs,
|
||||
- varkw=argspec.varkw,
|
||||
- defaults=argspec.defaults
|
||||
- )
|
||||
+ signature_params = str(inspect.signature(method))
|
||||
signature_params = signature_params.lstrip('(')
|
||||
signature_params = signature_params.rstrip(')')
|
||||
section.style.start_sphinx_py_method(name, signature_params)
|
Loading…
Reference in new issue