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

Stop sub-classing object #8249

Merged
merged 4 commits into from
Sep 4, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Backout changes to comments.
  • Loading branch information
clokep committed Sep 3, 2020
commit e9cb98d8a24cc2bdf88b0c609eece4faa1d88dd3
4 changes: 2 additions & 2 deletions synapse/handlers/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ async def _register_email_threepid(self, user_id, threepid, token):

Args:
user_id (str): id of user
threepid : m.login.email.identity auth response
threepid (object): m.login.email.identity auth response
token (str|None): access_token for the user, or None if not logged
in.
"""
Expand Down Expand Up @@ -762,7 +762,7 @@ async def _register_msisdn_threepid(self, user_id, threepid):

Args:
user_id (str): id of user
threepid : m.login.msisdn auth response
threepid (object): m.login.msisdn auth response
"""
try:
assert_params_in_dict(threepid, ["medium", "address", "validated_at"])
Expand Down
2 changes: 1 addition & 1 deletion synapse/http/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ async def post_json_get_json(self, uri, post_json, headers=None):

Args:
uri (str):
post_json :
post_json (object):
headers (dict[str|bytes, List[str|bytes]]|None): If not None, a map from
header name to a list of values for that header

Expand Down
2 changes: 1 addition & 1 deletion synapse/http/matrixfederationclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ def build_auth_headers(
destination_is must be non-None.
method (bytes): The HTTP method of the request
url_bytes (bytes): The URI path of the request
content : The body of the request
content (object): The body of the request
destination_is (bytes): As 'destination', but if the destination is an
identity server

Expand Down
4 changes: 2 additions & 2 deletions synapse/logging/opentracing.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@ def ensure_active_span(message, ret=None):
Args:
message (str): Message which fills in "There was no active span when trying to %s"
in the error log if there is no active span and opentracing is enabled.
ret : return value if opentracing is None or there is no active span.
ret (object): return value if opentracing is None or there is no active span.

Returns : The result of the func or ret if opentracing is disabled or there
Returns (object): The result of the func or ret if opentracing is disabled or there
was no active span.
"""

Expand Down
4 changes: 2 additions & 2 deletions synapse/server_notices/consent_server_notices.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,8 @@ def copy_with_str_subst(x: Any, substitutions: Any) -> Any:
"""Deep-copy a structure, carrying out string substitions on any strings

Args:
x : structure to be copied
substitutions : substitutions to be made - passed into the
x (object): structure to be copied
substitutions (object): substitutions to be made - passed into the
string '%' operator

Returns:
Expand Down
2 changes: 1 addition & 1 deletion synapse/storage/databases/main/e2e_room_keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ async def get_e2e_room_keys_version_info(self, user_id, version=None):
fields including:
version(str)
algorithm(str)
auth_data: opaque dict supplied by the client
auth_data(object): opaque dict supplied by the client
etag(int): tag of the keys in the backup
"""

Expand Down
2 changes: 1 addition & 1 deletion synapse/storage/util/id_generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def _load_current_id(db_conn, table, column, step=1):
"""

Args:
db_conn :
db_conn (object):
table (str):
column (str):
step (int):
Expand Down
2 changes: 1 addition & 1 deletion synapse/util/wheel_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def insert(self, now, obj, then):

Args:
now (int): Current time in msec
obj : Object to be inserted
obj (object): Object to be inserted
then (int): When to return the object strictly after.
"""
then_key = int(then / self.bucket_size) + 1
Expand Down