Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 3916e1b

Browse files
Clean up newline quote marks around the codebase (#6362)
1 parent 9cc168e commit 3916e1b

26 files changed

+43
-46
lines changed

changelog.d/6362.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Clean up some unnecessary quotation marks around the codebase.

synapse/app/federation_sender.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def __init__(self, db_conn, hs):
6969
self.federation_out_pos_startup = self._get_federation_out_pos(db_conn)
7070

7171
def _get_federation_out_pos(self, db_conn):
72-
sql = "SELECT stream_id FROM federation_stream_position" " WHERE type = ?"
72+
sql = "SELECT stream_id FROM federation_stream_position WHERE type = ?"
7373
sql = self.database_engine.convert_param_style(sql)
7474

7575
txn = db_conn.cursor()

synapse/appservice/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def _get():
185185

186186
if not _is_valid_3pe_metadata(info):
187187
logger.warning(
188-
"query_3pe_protocol to %s did not return a" " valid result", uri
188+
"query_3pe_protocol to %s did not return a valid result", uri
189189
)
190190
return None
191191

synapse/config/appservice.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ def _load_appservice(hostname, as_info, config_filename):
134134
for regex_obj in as_info["namespaces"][ns]:
135135
if not isinstance(regex_obj, dict):
136136
raise ValueError(
137-
"Expected namespace entry in %s to be an object," " but got %s",
137+
"Expected namespace entry in %s to be an object, but got %s",
138138
ns,
139139
regex_obj,
140140
)

synapse/config/room_directory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def __init__(self, option_name, rule):
170170
self.action = action
171171
else:
172172
raise ConfigError(
173-
"%s rules can only have action of 'allow'" " or 'deny'" % (option_name,)
173+
"%s rules can only have action of 'allow' or 'deny'" % (option_name,)
174174
)
175175

176176
self._alias_matches_all = alias == "*"

synapse/config/server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def read_config(self, config, **kwargs):
223223
self.federation_ip_range_blacklist.update(["0.0.0.0", "::"])
224224
except Exception as e:
225225
raise ConfigError(
226-
"Invalid range(s) provided in " "federation_ip_range_blacklist: %s" % e
226+
"Invalid range(s) provided in federation_ip_range_blacklist: %s" % e
227227
)
228228

229229
if self.public_baseurl is not None:
@@ -787,14 +787,14 @@ def add_arguments(parser):
787787
"--print-pidfile",
788788
action="store_true",
789789
default=None,
790-
help="Print the path to the pidfile just" " before daemonizing",
790+
help="Print the path to the pidfile just before daemonizing",
791791
)
792792
server_group.add_argument(
793793
"--manhole",
794794
metavar="PORT",
795795
dest="manhole",
796796
type=int,
797-
help="Turn on the twisted telnet manhole" " service on the given port.",
797+
help="Turn on the twisted telnet manhole service on the given port.",
798798
)
799799

800800

synapse/federation/persistence.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def have_responded(self, origin, transaction):
4444
response code and response body.
4545
"""
4646
if not transaction.transaction_id:
47-
raise RuntimeError("Cannot persist a transaction with no " "transaction_id")
47+
raise RuntimeError("Cannot persist a transaction with no transaction_id")
4848

4949
return self.store.get_received_txn_response(transaction.transaction_id, origin)
5050

@@ -56,7 +56,7 @@ def set_response(self, origin, transaction, code, response):
5656
Deferred
5757
"""
5858
if not transaction.transaction_id:
59-
raise RuntimeError("Cannot persist a transaction with no " "transaction_id")
59+
raise RuntimeError("Cannot persist a transaction with no transaction_id")
6060

6161
return self.store.set_received_txn_response(
6262
transaction.transaction_id, origin, code, response

synapse/federation/sender/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
sent_pdus_destination_dist_total = Counter(
5151
"synapse_federation_client_sent_pdu_destinations:total",
52-
"" "Total number of PDUs queued for sending across all destinations",
52+
"Total number of PDUs queued for sending across all destinations",
5353
)
5454

5555

synapse/federation/sender/transaction_manager.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def send_new_transaction(self, destination, pending_pdus, pending_edus):
8484
txn_id = str(self._next_txn_id)
8585

8686
logger.debug(
87-
"TX [%s] {%s} Attempting new transaction" " (pdus: %d, edus: %d)",
87+
"TX [%s] {%s} Attempting new transaction (pdus: %d, edus: %d)",
8888
destination,
8989
txn_id,
9090
len(pdus),
@@ -103,7 +103,7 @@ def send_new_transaction(self, destination, pending_pdus, pending_edus):
103103
self._next_txn_id += 1
104104

105105
logger.info(
106-
"TX [%s] {%s} Sending transaction [%s]," " (PDUs: %d, EDUs: %d)",
106+
"TX [%s] {%s} Sending transaction [%s], (PDUs: %d, EDUs: %d)",
107107
destination,
108108
txn_id,
109109
transaction.transaction_id,

synapse/handlers/directory.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def create_association(
119119
if not service.is_interested_in_alias(room_alias.to_string()):
120120
raise SynapseError(
121121
400,
122-
"This application service has not reserved" " this kind of alias.",
122+
"This application service has not reserved this kind of alias.",
123123
errcode=Codes.EXCLUSIVE,
124124
)
125125
else:

0 commit comments

Comments
 (0)