File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 18
18
19
19
install :
20
20
- travis_retry pip install -q coveralls codecov
21
- - pip install flake8 six # eventually worth
21
+ - pip install flake8 # eventually worth
22
22
23
23
script :
24
24
# Run tests
Original file line number Diff line number Diff line change 5
5
6
6
import weakref
7
7
8
- from six import add_metaclass
9
-
10
8
11
9
class FlyweightMeta (type ):
12
10
@@ -67,8 +65,12 @@ def __repr__(self):
67
65
return "<Card: %s%s>" % (self .value , self .suit )
68
66
69
67
70
- @add_metaclass (FlyweightMeta )
71
- class Card2 (object ):
68
+ def with_metaclass (meta , * bases ):
69
+ """ Provide python cross-version metaclass compatibility. """
70
+ return meta ("NewBase" , bases , {})
71
+
72
+
73
+ class Card2 (with_metaclass (FlyweightMeta )):
72
74
73
75
def __init__ (self , * args , ** kwargs ):
74
76
# print('Init {}: {}'.format(self.__class__, (args, kwargs)))
You can’t perform that action at this time.
0 commit comments