Skip to content

Commit 4c4da9e

Browse files
fix linting issues
1 parent 0c35b0e commit 4c4da9e

7 files changed

Lines changed: 12 additions & 8 deletions

File tree

.slack/apps.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ python3 app.py
9898
ruff check
9999

100100
# Run ruff from root directory for formatting
101-
ruff format
101+
ruff format && ruff check --fix
102102
```
103103

104104
## Testing

listeners/functions/filters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
from enum import Enum
21
import logging
2+
from enum import Enum
33
from typing import List, Optional, TypedDict
44

55
from slack_bolt import Ack, Complete, Fail

listeners/functions/search.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
1-
from ast import List
21
import logging
2+
from ast import List
33
from typing import NotRequired, Optional, TypedDict
44

55
from slack_bolt import Ack, Complete, Fail
66
from slack_sdk import WebClient
77

88
from listeners.sample_data_fetcher import SlackResponseError, fetch_sample_data
99

10+
SEARCH_PROCESSING_ERROR_MSG = (
11+
"We encountered an issue processing your search results. "
12+
"Please try again or contact the app owner if the problem persists."
13+
)
1014

11-
SEARCH_PROCESSING_ERROR_MSG = "We encountered an issue processing your search results. Please try again or contact the app owner if the problem persists."
15+
print(SEARCH_PROCESSING_ERROR_MSG)
1216

1317

1418
class EntityReference(TypedDict):

listeners/sample_data_fetcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import json
22
import logging
3-
from textwrap import indent
3+
44
from slack_sdk import WebClient
55

66

tests/listeners/functions/test_filters.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
from slack_bolt import Ack, Complete, Fail
44

5-
from listeners.functions.filters import filters_step_callback, FILTER_PROCESSING_ERROR_MSG
5+
from listeners.functions.filters import FILTER_PROCESSING_ERROR_MSG, filters_step_callback
66

77

88
class TestFilters:
@@ -71,6 +71,7 @@ def test_filters_step_callback_unexpected_exception(self):
7171

7272
self.mock_fail.assert_called_once()
7373
call_args = self.mock_fail.call_args
74+
print(FILTER_PROCESSING_ERROR_MSG)
7475
assert call_args.kwargs["error"] == FILTER_PROCESSING_ERROR_MSG
7576

7677
self.mock_ack.assert_called_once()

tests/listeners/functions/test_search.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from slack_bolt import Ack, Complete, Fail
44
from slack_sdk import WebClient
55

6-
from listeners.functions.search import search_step_callback, SEARCH_PROCESSING_ERROR_MSG
6+
from listeners.functions.search import SEARCH_PROCESSING_ERROR_MSG, search_step_callback
77
from listeners.sample_data_fetcher import SlackResponseError
88

99

0 commit comments

Comments
 (0)