moved metaclass declaration into class descriptor.
This commit is contained in:
@@ -1,14 +1,13 @@
|
|||||||
from abc import ABCMeta, abstractmethod
|
from abc import ABCMeta, abstractmethod
|
||||||
|
|
||||||
|
|
||||||
class Strategy(object):
|
class Strategy(object, metaclass=ABCMeta):
|
||||||
"""
|
"""
|
||||||
An abstract Strategy class.
|
An abstract Strategy class.
|
||||||
All strategies should inherit this class.
|
All strategies should inherit this class.
|
||||||
|
|
||||||
External Strategy Pattern documentation: U{https://en.wikipedia.org/wiki/Strategy_pattern}
|
External Strategy Pattern documentation: U{https://en.wikipedia.org/wiki/Strategy_pattern}
|
||||||
"""
|
"""
|
||||||
__metaclass__ = ABCMeta
|
|
||||||
|
|
||||||
@abstractmethod
|
@abstractmethod
|
||||||
def __call__(self, *args, **kwargs):
|
def __call__(self, *args, **kwargs):
|
||||||
|
|||||||
Reference in New Issue
Block a user