Skip to content

Commit

Permalink
Make Command an abstract base class to declare the _invoke method.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Aug 6, 2024
1 parent d8691d4 commit 9e64abe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion jaraco/vcs/cmd.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import abc
import collections
import itertools
import operator
Expand All @@ -13,7 +14,10 @@
TaggedRevision = collections.namedtuple('TaggedRevision', 'tag revision')


class Command:
class Command(metaclass=abc.ABCMeta):
@abc.abstractmethod
def _invoke(self, *args): ...

def is_valid(self):
try:
# Check if both command and repo are valid
Expand Down

0 comments on commit 9e64abe

Please sign in to comment.