Style fixes.

This commit is contained in:
poljar (Damir Jelić) 2018-02-07 12:42:33 +01:00
parent ad208cbb3a
commit ce718a9259
3 changed files with 21 additions and 23 deletions

View file

@ -212,8 +212,8 @@ def try_ssl_handshake(server):
message = ("{prefix}Error while doing SSL handshake"
": {error}").format(
prefix=W.prefix("network"),
error=str_error)
prefix=W.prefix("network"),
error=str_error)
server_buffer_prnt(server, message)
@ -242,8 +242,8 @@ def receive_cb(server_name, file_descriptor):
message = ("{prefix}Error while reading from "
"socket: {error}").format(
prefix=W.prefix("network"),
error=str_error)
prefix=W.prefix("network"),
error=str_error)
server_buffer_prnt(server, message)

View file

@ -106,10 +106,10 @@ class MatrixClient:
path = ("{api}/rooms/{room}/send/m.room.message/"
"{tx_id}?{query_parameters}").format(
api=MATRIX_API_PATH,
room=quote(room_id),
tx_id=quote(str(self._get_txn_id())),
query_parameters=urlencode(query_parameters))
api=MATRIX_API_PATH,
room=quote(room_id),
tx_id=quote(str(self._get_txn_id())),
query_parameters=urlencode(query_parameters))
return HttpRequest(RequestType.PUT, self.host, path, content)
@ -146,12 +146,12 @@ class MatrixClient:
return HttpRequest(RequestType.PUT, self.host, path, content)
def room_get_messages(
self,
room_id,
start_token,
end_token="",
limit=10,
direction='b'
self,
room_id,
start_token,
end_token="",
limit=10,
direction='b'
):
query_parameters = {
"access_token": self.access_token,

View file

@ -224,8 +224,8 @@ class MatrixServer:
message = ("{prefix}Error while writing to "
"socket: {error}").format(
prefix=W.prefix("network"),
error=strerr)
prefix=W.prefix("network"),
error=strerr)
server_buffer_prnt(self, message)
server_buffer_prnt(
@ -242,7 +242,7 @@ class MatrixServer:
server_buffer_prnt(
self,
"{prefix}matrix: Error while writing to socket".format(
W.prefix("network")))
prefix=W.prefix("network")))
server_buffer_prnt(
self,
("{prefix}matrix: disconnecting from server...").format(
@ -379,10 +379,10 @@ class MatrixServer:
message = ("{prefix}matrix: Connecting to "
"{server}:{port}{ssl}...").format(
prefix=W.prefix("network"),
server=self.address,
port=self.port,
ssl=ssl_message)
prefix=W.prefix("network"),
server=self.address,
port=self.port,
ssl=ssl_message)
W.prnt(self.server_buffer, message)
@ -499,5 +499,3 @@ def send_cb(server_name, file_descriptor):
server.try_send(server, server.send_buffer)
return W.WEECHAT_RC_OK