Skip to content
Snippets Groups Projects
Commit a35aadda authored by Christos Tsolakis's avatar Christos Tsolakis
Browse files

Fix python 3.13 deprecation warnings

Fixes warning for `re.sub`:

DeprecationWarning: 'count' is passed as positional argument
parent a5c56520
No related branches found
No related tags found
No related merge requests found
......@@ -342,9 +342,9 @@ def get_constructors(c):
if signature.startswith("def " + name + "("):
signature = re.sub("-> \'?" + name + "\'?", "-> None", signature)
if signature.startswith("def " + name + "()"):
constructors.append(re.sub(name + r"\(", "__init__(self", signature, 1))
constructors.append(re.sub(name + r"\(", "__init__(self", signature, count=1))
else:
constructors.append(re.sub(name + r"\(", "__init__(self, ", signature, 1))
constructors.append(re.sub(name + r"\(", "__init__(self, ", signature, count=1))
return constructors
def handle_static(o, signature):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment