Skip to content

Commit 9ea7e4c

Browse files
committed
Use Python 2 & 3 compatible syntax for metaclass usage.
1 parent edb064d commit 9ea7e4c

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

github2/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -263,9 +263,9 @@ def iterate(self):
263263
return result_cls
264264

265265

266-
class BaseData(object):
267-
__metaclass__ = BaseDataType
268-
266+
# Ugly base class definition for Python 2 and 3 compatibility, where metaclass
267+
# syntax is incompatible
268+
class BaseData(BaseDataType('BaseData', (object, ), {})):
269269
def __getitem__(self, key):
270270
"""Access objects's attribute using subscript notation
271271

0 commit comments

Comments
 (0)