Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions ascenderkit/cli/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,12 @@ class AdhocCommandStdout(HasStdout, CustomAction):
class HasCancel:
"""Stopping a job that is still pending or running."""

# Supplied by the CustomAction this is mixed into. Annotations rather than
# assignments: they describe the contract without creating class attributes
# that would shadow the real ones.
page: 'api.pages.Page'
resource: str

action = 'cancel'

def add_arguments(self, parser, resource_options_parser):
Expand Down Expand Up @@ -410,6 +416,12 @@ def perform(self):
class HasTest:
"""Asking the platform to exercise a thing rather than describe it."""

# Supplied by the CustomAction this is mixed into. Annotations rather than
# assignments: they describe the contract without creating class attributes
# that would shadow the real ones.
page: 'api.pages.Page'
resource: str

action = 'test'

def add_arguments(self, parser, resource_options_parser):
Expand Down