Skip to content

Commit 51bb915

Browse files
committed
Formatting
1 parent b4712d3 commit 51bb915

19 files changed

Lines changed: 97 additions & 41 deletions

.flake8

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[flake8]
2+
max-line-length = 88
3+
4+
select = C,E,F,W,B,B950
5+
6+
max-complexity = 10
7+
8+
ignore =
9+
E501
10+
F401
11+
W503
12+
13+
exclude =
14+
__pycache__
15+
testing.py

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ pytest-aiohttp = "*"
2323
asynctest = "*"
2424
isort = "*"
2525
black = "*"
26+
flake8 = "*"
2627

2728
[requires]
2829
python_version = "3.7"

Pipfile.lock

Lines changed: 37 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pybot/endpoints/airtable/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
from typing import List, Optional, Tuple
22

33
from sirbot import SirBot
4-
5-
from pybot.endpoints.slack.utils import MENTOR_CHANNEL
6-
from pybot.plugins.airtable.api import AirtableAPI
74
from slack import ROOT_URL, methods
85
from slack.events import Message
96
from slack.exceptions import SlackAPIError
107
from slack.io.aiohttp import SlackAPI
118

9+
from pybot.endpoints.slack.utils import MENTOR_CHANNEL
10+
from pybot.plugins.airtable.api import AirtableAPI
11+
1212
from .message_templates.messages import claim_mentee_attachment, mentor_request_text
1313

1414

pybot/endpoints/api/slack_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import logging
22

33
from sirbot import SirBot
4+
from slack import ROOT_URL
5+
from slack.exceptions import SlackAPIError
46

57
from pybot.endpoints.api.utils import (
68
_slack_info_from_email,
@@ -9,8 +11,6 @@
911
)
1012
from pybot.plugins import APIPlugin
1113
from pybot.plugins.api.request import SlackApiRequest
12-
from slack import ROOT_URL
13-
from slack.exceptions import SlackAPIError
1414

1515
logger = logging.getLogger(__name__)
1616

pybot/endpoints/api/utils.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
import logging
22
from typing import Optional
33

4+
from slack import ROOT_URL
5+
from slack.exceptions import SlackAPIError
6+
from slack.io.abc import SlackAPI
7+
from slack.methods import Methods
8+
49
from pybot.endpoints.slack.utils import MODERATOR_CHANNEL, PYBOT_ENV
510
from pybot.endpoints.slack.utils.action_messages import (
611
TICKET_OPTIONS,
712
not_claimed_attachment,
813
)
914
from pybot.plugins.api.request import SlackApiRequest
10-
from slack import ROOT_URL
11-
from slack.exceptions import SlackAPIError
12-
from slack.io.abc import SlackAPI
13-
from slack.methods import Methods
1415

1516
logger = logging.getLogger(__name__)
1617

pybot/endpoints/slack/actions/general_actions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
from sirbot import SirBot
2+
from slack import methods
3+
from slack.actions import Action
24

35
from pybot.endpoints.slack.utils.action_messages import (
46
base_response,
57
claimed_attachment,
68
not_claimed_attachment,
79
)
8-
from slack import methods
9-
from slack.actions import Action
1010

1111

1212
async def claimed(action: Action, app: SirBot):

pybot/endpoints/slack/actions/help_ticket.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
from sirbot import SirBot
2+
from slack import methods
3+
from slack.actions import Action
24

35
from pybot.endpoints.slack.utils import TICKET_CHANNEL
46
from pybot.endpoints.slack.utils.action_messages import (
57
ticket_attachments,
68
update_ticket_message,
79
updated_ticket_status,
810
)
9-
from slack import methods
10-
from slack.actions import Action
1111

1212

1313
async def ticket_status(action: Action, app: SirBot):

pybot/endpoints/slack/actions/mentor_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
import logging
33

44
from sirbot import SirBot
5+
from slack import methods
6+
from slack.actions import Action
57

68
from pybot.endpoints.slack.message_templates.mentor_request import (
79
MentorRequest,
810
MentorRequestClaim,
911
)
1012
from pybot.endpoints.slack.utils.action_messages import mentor_details_dialog
11-
from slack import methods
12-
from slack.actions import Action
1313

1414
logger = logging.getLogger(__name__)
1515

pybot/endpoints/slack/actions/new_member.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
from sirbot import SirBot
2+
from slack import methods
3+
from slack.actions import Action
24

35
from pybot.endpoints.slack.utils import COMMUNITY_CHANNEL
46
from pybot.endpoints.slack.utils.action_messages import (
@@ -10,8 +12,6 @@
1012
reset_greet_message,
1113
suggestion_dialog,
1214
)
13-
from slack import methods
14-
from slack.actions import Action
1515

1616

1717
async def resource_buttons(action: Action, app: SirBot):

0 commit comments

Comments
 (0)