mirror of
https://github.com/wassname/catalyst.git
synced 2026-10-04 12:30:07 +08:00
MAINT: Use Python 3 compatible metaclass.
Use six's with_metaclass to have objects that use metaclasses, in both Python 2 and 3. Otherwise, in Python 3 the objects were being treated as if they did not have a metaclass, when the Python 2 syntax is used, leading to errors because of missing attributes, etc.
This commit is contained in:
1 parent
f093b2fb59
commit
8481e2df49
7 files changed
+21
-17
No files matched your search
@@ -3,13 +3,13 @@ from abc import (
|
||||
abstractproperty
|
||||
)
|
||||
|
||||
from six import with_metaclass
|
||||
|
||||
from zipline.protocol import DATASOURCE_TYPE
|
||||
from zipline.protocol import Event
|
||||
|
||||
|
||||
class DataSource(object):
|
||||
|
||||
__metaclass__ = ABCMeta
|
||||
class DataSource(with_metaclass(ABCMeta)):
|
||||
|
||||
@property
|
||||
def event_type(self):
|
||||
|
||||
Reference in new issue
Block a user