Skip to content

Commit

Permalink
Fix usage with Python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Nusan committed Nov 14, 2022
1 parent 76318f9 commit 8b4ec9c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion FoxDot/lib/Effects/NewEffects.py
Expand Up @@ -14,7 +14,7 @@ def __init__(self):
self.lines = []
def __call__(self, order=0):
def decorator(effect):
effect_data = inspect.getargspec(effect) # Original args and defaults
effect_data = inspect.getfullargspec(effect) # Original args and defaults

# Get filename from function name
filename = "{}.scd".format(effect.__name__)# filename
Expand Down
4 changes: 2 additions & 2 deletions FoxDot/lib/Patterns/Main.py
Expand Up @@ -34,7 +34,7 @@ def new_function(*args):
for i in range(LCM(*[len(arg) for arg in args if (hasattr(arg, '__len__') and not isinstance(arg, PGroup))])):
pat |= f(*[(arg[i] if isinstance(arg, Pattern) else arg) for arg in args])
return pat
new_function.argspec = inspect.getargspec(f)
new_function.argspec = inspect.getfullargspec(f)
return new_function

# TODO -- if it isn't looped, return the original if it is a group
Expand All @@ -58,7 +58,7 @@ def new_function(self, *args):
pat |= f(self, *[(modi(arg, i) if not isinstance(arg, PGroup) else arg) for arg in args])
return pat

new_function.argspec = inspect.getargspec(f)
new_function.argspec = inspect.getfullargspec(f)
return new_function

def PatternMethod(f):
Expand Down
2 changes: 1 addition & 1 deletion FoxDot/lib/Repeat.py
Expand Up @@ -424,7 +424,7 @@ def update(self, n, cycle=None, args=(), kwargs={}):

# Check if a method has the _beat_ keyword argument

if "_beat_" in inspect.getargspec(self.method).args:
if "_beat_" in inspect.getfullargspec(self.method).args:

self.kwargs["_beat_"] = None

Expand Down
6 changes: 3 additions & 3 deletions FoxDot/lib/TempoClock.py
Expand Up @@ -765,15 +765,15 @@ def add(self, item, beat, args=(), kwargs={}, is_priority=False):

try:

function = inspect.getargspec(item)
function = inspect.getfullargspec(item)

except TypeError:

function = inspect.getargspec(item.__call__)
function = inspect.getfullargspec(item.__call__)

# If the item can't take arbitrary keywords, check any kwargs are valid

if function.keywords is None:
if function.varkw is None:

for key in list(kwargs.keys()):

Expand Down

0 comments on commit 8b4ec9c

Please sign in to comment.