Skip to content

Commit

Permalink
Fix indentation and formatting.
Browse files Browse the repository at this point in the history
  • Loading branch information
nzlosh committed Sep 18, 2024
1 parent 451a94b commit 9561d7b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
18 changes: 9 additions & 9 deletions src/err-stackstorm/errst2lib/enquiry.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(self, enquiry, ttl=3600):
The Enquiry class wraps the St2 API response in a Python Object. The Python object
tracks the answers provided for the specific enquiry and maintains a time to live for
answers to be considered abandonned.
enquiry: the stackstorm enquiry API response object in JSON form.
ttl: seconds to consider the enquiry should remain.
"""
Expand All @@ -82,14 +82,14 @@ def __init__(self, enquiry, ttl=3600):

@classmethod
def get_associated_data(cls):
"""
The enquiry data is insufficent to identify it's association with a specific workflow.
The get_associated_data queries the associated execution_id and then the associated workflow.
to collect descriptions
"""
raise NotImplementedError

"""
The enquiry data is insufficent to identify it's association
with a specific workflow. The get_associated_data queries the
associated execution_id and then the associated workflow. to
collect descriptions
"""
raise NotImplementedError

@property
def id(self):
return self.enquiry_data["id"]
Expand Down
3 changes: 1 addition & 2 deletions src/err-stackstorm/errst2lib/stackstorm_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,10 @@ def refresh_bot_credentials(self):

def action_get(self, action_id):
raise NotImplementedError

def workflow_get(self, action_id):
raise NotImplementedError


def enquiry_list(self, st2_creds=None):
"""
curl -X GET -H 'X-Auth-Token: X' 'http://127.0.0.1:9101/v1/inquiries/?limit=50'
Expand Down
5 changes: 3 additions & 2 deletions src/err-stackstorm/st2.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,15 +351,16 @@ def remove_bot_prefix(msg):
action_alias = matched_result.message["actionalias"]
del matched_result

if action_alias.get("enabled", True) == False:
if action_alias.get("enabled", True) is False:
return "The command '{}' is disabled.".format(msg.body)

actionalias_exec_result = self.st2api.execute_actionalias(
msg, self.chatbackend.get_username(msg), st2token
)

LOG.debug(
f"action alias execution result: type={type(actionalias_exec_result)} {actionalias_exec_result}"
f"action alias execution result: "
"type={type(actionalias_exec_result)} {actionalias_exec_result}"
)

if not isinstance(actionalias_exec_result, dict):
Expand Down

0 comments on commit 9561d7b

Please sign in to comment.