[Python] Avoid DeprecationWarning in inspect.getargspec on Python 3 (#9271)

* Avoid DeprecationWarning in inspect.getargspec on Python 3

* Regenerate samples
This commit is contained in:
johnthagen
2021-04-30 14:59:33 -04:00
committed by GitHub
parent ebc1d7bd95
commit a88313c40c
189 changed files with 945 additions and 378 deletions

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class AdditionalPropertiesAnyType(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class AdditionalPropertiesArray(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class AdditionalPropertiesBoolean(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -339,7 +342,7 @@ class AdditionalPropertiesClass(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class AdditionalPropertiesInteger(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class AdditionalPropertiesNumber(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class AdditionalPropertiesObject(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class AdditionalPropertiesString(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -118,7 +121,7 @@ class Animal(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -131,7 +134,7 @@ class ApiResponse(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class ArrayOfArrayOfNumberOnly(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class ArrayOfNumberOnly(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -131,7 +134,7 @@ class ArrayTest(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -85,7 +88,7 @@ class BigCat(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -85,7 +88,7 @@ class BigCatAllOf(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -211,7 +214,7 @@ class Capitalization(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class Cat(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class CatAllOf(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -106,7 +109,7 @@ class Category(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class ClassModel(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class Client(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class Dog(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class DogAllOf(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -119,7 +122,7 @@ class EnumArrays(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -60,7 +63,7 @@ class EnumClass(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -208,7 +211,7 @@ class EnumTest(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -81,7 +84,7 @@ class File(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -105,7 +108,7 @@ class FileSchemaTestClass(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -463,7 +466,7 @@ class FormatTest(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -105,7 +108,7 @@ class HasOnlyReadOnly(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class List(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -165,7 +168,7 @@ class MapTest(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -131,7 +134,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -105,7 +108,7 @@ class Model200Response(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class ModelReturn(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -158,7 +161,7 @@ class Name(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class NumberOnly(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -217,7 +220,7 @@ class Order(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -131,7 +134,7 @@ class OuterComposite(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -60,7 +63,7 @@ class OuterEnum(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -219,7 +222,7 @@ class Pet(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -105,7 +108,7 @@ class ReadOnlyFirst(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -79,7 +82,7 @@ class SpecialModelName(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -105,7 +108,7 @@ class Tag(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -188,7 +191,7 @@ class TypeHolderDefault(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -215,7 +218,7 @@ class TypeHolderExample(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -263,7 +266,7 @@ class User(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else:

View File

@@ -10,7 +10,10 @@
"""
import inspect
try:
from inspect import getfullargspec
except ImportError:
from inspect import getargspec as getfullargspec
import pprint
import re # noqa: F401
import six
@@ -807,7 +810,7 @@ class XmlItem(object):
def convert(x):
if hasattr(x, "to_dict"):
args = inspect.getargspec(x.to_dict).args
args = getfullargspec(x.to_dict).args
if len(args) == 1:
return x.to_dict()
else: