Skip to content

Commit

Permalink
Merge pull request Pylons#3696 from Pylons/replace-getargspec
Browse files Browse the repository at this point in the history
get rid of deprecated getargspec and formatargspec
  • Loading branch information
mmerickel authored Mar 13, 2022
2 parents 6966401 + 1b0650d commit 9531d37
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
import sys
import os
import datetime
import inspect
import warnings

warnings.simplefilter('ignore', DeprecationWarning)
Expand Down Expand Up @@ -385,19 +384,7 @@ def setup(app):
app.add_directive('frontmatter', FrontMatter)
app.add_directive('mainmatter', MainMatter)
app.add_directive('backmatter', BackMatter)
app.connect('autodoc-process-signature', resig)


def resig(app, what, name, obj, options, signature, return_annotation):
""" Allow for preservation of ``@action_method`` decorated methods
in configurator """
docobj = getattr(obj, '__docobj__', None)
if docobj is not None:
argspec = inspect.getargspec(docobj)
if argspec[0] and argspec[0][0] in ('cls', 'self'):
del argspec[0][0]
signature = inspect.formatargspec(*argspec)
return signature, return_annotation


# turn off all line numbers in latex formatting

Expand Down

0 comments on commit 9531d37

Please sign in to comment.