Skip to content

Commit

Permalink
Move ArgSpec declaration to module level
Browse files Browse the repository at this point in the history
  • Loading branch information
zhelezov committed Mar 6, 2019
1 parent 520befb commit 8ae2b47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions beets/util/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,13 @@
from six import PY2


ArgSpec = namedtuple('ArgSpec', 'args varargs keywords defaults')


def getargspec(func):
if PY2:
return inspect.getargspec(func)

ArgSpec = namedtuple('ArgSpec', 'args varargs keywords defaults')

sig = inspect.signature(func)
args = [
p.name for p in sig.parameters.values()
Expand Down

0 comments on commit 8ae2b47

Please sign in to comment.