Fix the command plugin to use the ABCMeta metaclass
The abstract* decorators don't have any effect unless the class has an ABCMeta metaclass.
This commit is contained in:
parent
a3c400d0ce
commit
957ad8e769
1 changed files with 4 additions and 4 deletions
|
@ -10,17 +10,17 @@ __metaclass__ = type
|
|||
from abc import ABCMeta, abstractmethod, abstractproperty
|
||||
|
||||
|
||||
class Command:
|
||||
class Command(metaclass=ABCMeta):
|
||||
"""
|
||||
Subcommands of :program:`build-ansible.py`.
|
||||
|
||||
This defines an interface that all subcommands must conform to. :program:`build-ansible.py` will
|
||||
require that these things are present in order to proceed.
|
||||
This defines an interface that all subcommands must conform to. :program:`build-ansible.py`
|
||||
will require that these things are present in order to proceed.
|
||||
"""
|
||||
@staticmethod
|
||||
@abstractproperty
|
||||
def name():
|
||||
"""Name of the command. The same as the string is invoked with"""
|
||||
"""Name of the subcommand. It's the string to invoked it via on the command line"""
|
||||
|
||||
@staticmethod
|
||||
@abstractmethod
|
||||
|
|
Loading…
Reference in a new issue