Skip to content

Commit

Permalink
Merge pull request #2507 from hugovk/replace-deprecated
Browse files Browse the repository at this point in the history
Replace deprecated inspect.formatargspec with inspect.signature
  • Loading branch information
dlm6693 authored Jun 16, 2022
2 parents 098cc25 + 1d47590 commit 2396625
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions botocore/docs/method.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,7 @@ def document_custom_signature(
: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)
Expand Down

0 comments on commit 2396625

Please sign in to comment.