Skip to content

Commit b97c922

Browse files
author
Jeff Ammons
committed
Fix PEP8 standards and some wrong things in the docs.
1 parent b2e2f5a commit b97c922

File tree

4 files changed

+18
-8
lines changed

4 files changed

+18
-8
lines changed

docs/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ Submitting a Pull Request
114114
-------------------------
115115
Please feel free to sent us pull requests or issues that you'd like to see included in the python-slackclient!
116116

117-
We ask that you include any appropriate tests or documentation in the pull request and try to follow
117+
We ask that you include any appropriate tests or documentation in the pull request and try to follow
118118
`good commit message hygiene <https://medium.com/brigade-engineering/the-secrets-to-great-commit-messages-106fc0a92a25#.lsttwx97v>`_
119119
in your commit message and PR commentary.
120120

@@ -124,7 +124,7 @@ To build this documentation:
124124

125125
.. code-block:: bash
126126
127-
pip install requirements-dev.txt
127+
pip install -r requirements-dev.txt -r requirements.txt
128128
cd docs
129129
make html
130130

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ pytest-mock>=1.1
77
pytest-cov==2.2.1
88
pytest-pythonpath>=0.3
99
Sphinx==1.4.4
10+
sphinx-rtd-theme==0.1.9
1011
testfixtures==4.9.1
1112
tox>=1.8.0

slackclient/_client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ def api_call(self, method, **kwargs):
4949
Call the Slack Web API as documented here: https://api.slack.com/web
5050
5151
:Args:
52-
method (str): The API Method to call. See `the full list here <https://api.slack.com/methods>`_
52+
method (str): The API Method to call. See
53+
`the full list here <https://api.slack.com/methods>`_
5354
:Kwargs:
5455
(optional) kwargs: any arguments passed here will be bundled and sent to the api
5556
requester as post_data and will be passed along to the API.

slackclient/_server.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ def parse_user_data(self, user_data):
113113

114114
def send_to_websocket(self, data):
115115
"""
116-
Send a JSON message directly to the websocket. See `RTM documentation <https://api.slack.com/rtm` for allowed types.
116+
Send a JSON message directly to the websocket. See
117+
`RTM documentation <https://api.slack.com/rtm` for allowed types.
117118
118119
:Args:
119120
data (dict) the key/values to send the websocket.
@@ -165,8 +166,10 @@ def join_channel(self, name):
165166
166167
Note: this action is not allowed by bots, they must be invited to channels.
167168
'''
168-
return self.api_requester.do(self.token,
169-
"channels.join?name={}".format(name)).text
169+
return self.api_requester.do(
170+
self.token,
171+
"channels.join?name={}".format(name)
172+
).text
170173

171174
def api_call(self, method, **kwargs):
172175
'''
@@ -175,12 +178,17 @@ def api_call(self, method, **kwargs):
175178
:Args:
176179
method (str): The API Method to call. See here for a list: https://api.slack.com/methods
177180
:Kwargs:
178-
(optional) kwargs: any arguments passed here will be bundled and sent to the api requester as post_data
181+
(optional) kwargs: any arguments passed here will be bundled and sent to the api
182+
requester as post_data
179183
and will be passed along to the API.
180184
181185
Example::
182186
183-
sc.server.api_call("channels.setPurpose", channel="CABC12345", purpose="Writing some code!")
187+
sc.server.api_call(
188+
"channels.setPurpose",
189+
channel="CABC12345",
190+
purpose="Writing some code!"
191+
)
184192
185193
Returns:
186194
str -- returns the text of the HTTP response.

0 commit comments

Comments
 (0)