Skip to content

Commit ece733d

Browse files
committed
Install/run isort formatting
1 parent 23aa47f commit ece733d

29 files changed

Lines changed: 192 additions & 117 deletions

.isort.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[settings]
2+
line_length = 88
3+
multi_line_output = 3
4+
include_trailing_comma = true
5+
force_grid_wrap = 0
6+
use_parentheses = true

Pipfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ pytest-mock = "*"
2121
pytest-asyncio = "*"
2222
pytest-aiohttp = "*"
2323
asynctest = "*"
24+
isort = "*"
25+
black = "*"
2426

2527
[requires]
2628
python_version = "3.7"
29+
30+
[pipenv]
31+
allow_prereleases = true

Pipfile.lock

Lines changed: 109 additions & 50 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pybot/__main__.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1+
import logging.config
12
import os
3+
4+
import raven
25
import yaml
3-
import logging.config
46
from raven.conf import setup_logging
57
from raven.handlers.logging import SentryHandler
68
from raven.processors import SanitizePasswordsProcessor
7-
from sirbot.plugins.slack import SlackPlugin
89
from sirbot import SirBot
9-
import raven
10+
from sirbot.plugins.slack import SlackPlugin
1011

1112
from pybot.endpoints import handle_health_check
13+
from pybot.endpoints.slack.utils import HOST, PORT, slack_configs
14+
1215
from . import endpoints
1316
from .plugins import AirtablePlugin, APIPlugin
14-
from pybot.endpoints.slack.utils import PORT, HOST
15-
from pybot.endpoints.slack.utils import slack_configs
1617

1718
VERSION = "1.0"
1819
logger = logging.getLogger(__name__)

pybot/endpoints/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from aiohttp.web_response import Response
22

3-
from . import slack, airtable, api
3+
from . import airtable, api, slack
44

55

66
async def handle_health_check(request):

pybot/endpoints/airtable/requests.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
from sirbot import SirBot
21
import asyncio
32
import logging
43

4+
from sirbot import SirBot
5+
56
from pybot.endpoints.airtable.utils import (
67
_create_messages,
78
_get_matching_skillset_mentors,

pybot/endpoints/airtable/utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +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
47
from slack import ROOT_URL, methods
58
from slack.events import Message
69
from slack.exceptions import SlackAPIError
710
from slack.io.aiohttp import SlackAPI
8-
from pybot.plugins.airtable.api import AirtableAPI
9-
from pybot.endpoints.slack.utils import MENTOR_CHANNEL
11+
1012
from .message_templates.messages import claim_mentee_attachment, mentor_request_text
1113

1214

pybot/endpoints/api/slack_api.py

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

33
from sirbot import SirBot
4-
from slack import ROOT_URL
5-
from slack.exceptions import SlackAPIError
64

75
from pybot.endpoints.api.utils import (
86
_slack_info_from_email,
@@ -11,6 +9,8 @@
119
)
1210
from pybot.plugins import APIPlugin
1311
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: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,16 @@
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-
94
from pybot.endpoints.slack.utils import MODERATOR_CHANNEL, PYBOT_ENV
105
from pybot.endpoints.slack.utils.action_messages import (
116
TICKET_OPTIONS,
127
not_claimed_attachment,
138
)
149
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
1514

1615
logger = logging.getLogger(__name__)
1716

pybot/endpoints/slack/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from . import events, actions, commands, messages
1+
from . import actions, commands, events, messages
22

33

44
def create_endpoints(plugin):

0 commit comments

Comments
 (0)