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 1818
1919install :
2020 - travis_retry pip install -q coveralls codecov
21- - pip install flake8 six # eventually worth
21+ - pip install flake8 # eventually worth
2222
2323script :
2424 # Run tests
Original file line number Diff line number Diff line change 55
66import weakref
77
8- from six import add_metaclass
9-
108
119class FlyweightMeta (type ):
1210
@@ -67,8 +65,12 @@ def __repr__(self):
6765 return "<Card: %s%s>" % (self .value , self .suit )
6866
6967
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 )):
7274
7375 def __init__ (self , * args , ** kwargs ):
7476 # print('Init {}: {}'.format(self.__class__, (args, kwargs)))
You can’t perform that action at this time.
0 commit comments