Skip to content

Commit b6ee116

Browse files
committed
[patch] replace var types
1 parent 624dd79 commit b6ee116

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/mas/devops/slack.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,12 @@ def client(cls) -> WebClient:
3939

4040
# Post message to Slack
4141
# -----------------------------------------------------------------------------
42-
def postMessageBlocks(cls, channelList: str | list[str], messageBlocks: list, threadId: str = "") -> SlackResponse | list[SlackResponse]:
43-
responses = []
42+
def postMessageBlocks(cls, channelList: str | list[str], messageBlocks: list, threadId: str = None) -> SlackResponse | list[SlackResponse]:
43+
responses: list[SlackResponse] = []
4444

4545
if isinstance(channelList, str):
4646
channelList = [channelList]
4747
for channel in channelList:
48-
logger.info(f"{channel}")
4948
try:
5049
if threadId == "":
5150
logger.debug(f"Posting {len(messageBlocks)} block message to {channel} in Slack")
@@ -85,8 +84,8 @@ def postMessageBlocks(cls, channelList: str | list[str], messageBlocks: list, th
8584

8685
return responses if len(responses) > 1 else responses[0]
8786

88-
def postMessageText(cls, channelList: str | list[str], message: str, attachments=None, threadId: str = "") -> SlackResponse | list[SlackResponse]:
89-
responses: list[str] = []
87+
def postMessageText(cls, channelList: str | list[str], message: str, attachments=None, threadId: str = None) -> SlackResponse | list[SlackResponse]:
88+
responses: list[SlackResponse] = []
9089

9190
if isinstance(channelList, str):
9291
channelList = [channelList]
@@ -128,7 +127,7 @@ def postMessageText(cls, channelList: str | list[str], message: str, attachments
128127
return responses if len(responses) > 1 else responses[0]
129128

130129
def createMessagePermalink(
131-
cls, slackResponse: SlackResponse = None, channelId: str = "", messageTimestamp: str = "", domain: str = "ibm-mas"
130+
cls, slackResponse: SlackResponse = None, channelId: str = None, messageTimestamp: str = None, domain: str = "ibm-mas"
132131
) -> str:
133132
if slackResponse is not None:
134133
channelId = slackResponse["channel"]

0 commit comments

Comments
 (0)