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:
parent
d45727e028
commit
2bae587a76
1 changed files with 1 additions and 4 deletions
|
|
@ -229,10 +229,7 @@ class InstanceTrackerMeta(type):
|
|||
@six.add_metaclass(InstanceTrackerMeta)
|
||||
class BaseModel(object):
|
||||
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)
|
||||
return instance
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue