Skip to content

Commit

Permalink
fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
vladimir.kadochnik committed Jul 19, 2024
1 parent 7ff0d9e commit bc6cb2f
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 6 deletions.
3 changes: 2 additions & 1 deletion slack_notifications/common.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import requests
import logging

import requests

logger = logging.getLogger(__name__)


Expand Down
2 changes: 1 addition & 1 deletion slack_notifications/fields/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def to_dict(self):
class ButtonBlock(BaseBlock):
__type__ = 'button'

def __init__(self, text: str, *, action_id: str, value: str, style: str = None, **kwargs):
def __init__(self, text: str, *, action_id: str, value: str, style: str = None, **kwargs):
super(ButtonBlock, self).__init__(**kwargs)

self.text = text
Expand Down
3 changes: 2 additions & 1 deletion slack_notifications/mattermost/client.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
from typing import List
import logging

import requests

from slack_notifications.utils import _random_string
Expand Down Expand Up @@ -187,7 +188,7 @@ def send_notify(self,
Resource('posts', 'POST'), json=data,
)
return MattermostMessage(
self, response, text=text, raise_exc=raise_exc, blocks=blocks, attachments=attachments
self, response, text=text, raise_exc=raise_exc, blocks=blocks, attachments=attachments
)

def upload_file(self,
Expand Down
2 changes: 1 addition & 1 deletion slack_notifications/mattermost/converter.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def fields_to_table(self, fields: List[SimpleTextBlockField]):
table_rows = []
for i in range(0, len(fields), 2):
row = fields[i:i + 2]
table_rows.append('|'+'|'.join(map(lambda v: str(v.text), row))+'|')
table_rows.append('|' + '|'.join(map(lambda v: str(v.text), row)) + '|')

return '\n'.join([header, separator] + table_rows)

Expand Down
2 changes: 1 addition & 1 deletion slack_notifications/slack/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
'call_resource',
'resource_iterator',
'send_notify',
]
]
3 changes: 2 additions & 1 deletion slack_notifications/slack/client.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import os
from typing import List
import requests
import logging

import requests

from slack_notifications.common import Resource, NotificationClient
from slack_notifications.utils import _random_string
from slack_notifications.fields import BaseBlock, Attachment
Expand Down

0 comments on commit bc6cb2f

Please sign in to comment.