fix warning on py2 as well

object takes no constructor argument whatever the python version.
we simplify the code to not use constructor arguments
This commit is contained in:
Pierre Tardy 2017-05-15 11:28:42 +02:00
parent d45727e028
commit 2bae587a76
No known key found for this signature in database
GPG Key ID: CE916B1801820C0A

View File

@ -229,9 +229,6 @@ class InstanceTrackerMeta(type):
@six.add_metaclass(InstanceTrackerMeta) @six.add_metaclass(InstanceTrackerMeta)
class BaseModel(object): class BaseModel(object):
def __new__(cls, *args, **kwargs): def __new__(cls, *args, **kwargs):
if six.PY2:
instance = super(BaseModel, cls).__new__(cls, *args, **kwargs)
else:
instance = super(BaseModel, cls).__new__(cls) instance = super(BaseModel, cls).__new__(cls)
cls.instances.append(instance) cls.instances.append(instance)
return instance return instance