From 957ad8e76982a2f0c0a5da55e06e50b179096fcf Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Wed, 13 May 2020 19:44:16 -0700 Subject: [PATCH] Fix the command plugin to use the ABCMeta metaclass The abstract* decorators don't have any effect unless the class has an ABCMeta metaclass. --- hacking/build_library/build_ansible/commands.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hacking/build_library/build_ansible/commands.py b/hacking/build_library/build_ansible/commands.py index e689e25a372..826799349e5 100644 --- a/hacking/build_library/build_ansible/commands.py +++ b/hacking/build_library/build_ansible/commands.py @@ -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