Fix support for Python 3.11 (fixes #491) (#505)

Co-authored-by: tibequadorian <tibequadorian@posteo.de>
This commit is contained in:
Sebastian Pipping 2023-04-18 02:06:11 +02:00 committed by GitHub
parent 682a027d04
commit 06d8f491c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -666,7 +666,7 @@ def has_method(module, method_name, no_of_args=0):
Check whether the given function is defined in the module or not.
"""
if hasattr(module, method_name):
if len(inspect.getargspec(getattr(module, method_name)).args) == no_of_args:
if len(inspect.getfullargspec(getattr(module, method_name)).args) == no_of_args:
return True
return False