Skip to content

Commit

Permalink
getargspec is deprecated in python3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
niol committed Dec 18, 2023
1 parent c4043c8 commit e478a00
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions webapp/graphite/functions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,11 @@ def PieFunction(name):


def functionInfo(name, func):
argspec = inspect.getargspec(func)
argformat = inspect.formatargspec(argspec[0][1:], argspec[1], argspec[2], argspec[3])
sig = inspect.signature(func)
argspec = ', '.join(list(map(str, sig.parameters.values()))[1:])
return {
'name': name,
'function': name + argformat,
'function': f'{name}({argspec})',
'description': inspect.getdoc(func),
'module': inspect.getmodule(func).__name__,
'group': getattr(func, 'group', 'Ungrouped'),
Expand Down

0 comments on commit e478a00

Please sign in to comment.