mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-03 02:34:50 -04:00
Run Black. (#5482)
This commit is contained in:
parent
7dcf984075
commit
32e7c9e7f2
376 changed files with 9142 additions and 10388 deletions
|
@ -32,21 +32,11 @@ class Edu(JsonEncodedObject):
|
|||
internal ID or previous references graph.
|
||||
"""
|
||||
|
||||
valid_keys = [
|
||||
"origin",
|
||||
"destination",
|
||||
"edu_type",
|
||||
"content",
|
||||
]
|
||||
valid_keys = ["origin", "destination", "edu_type", "content"]
|
||||
|
||||
required_keys = [
|
||||
"edu_type",
|
||||
]
|
||||
required_keys = ["edu_type"]
|
||||
|
||||
internal_keys = [
|
||||
"origin",
|
||||
"destination",
|
||||
]
|
||||
internal_keys = ["origin", "destination"]
|
||||
|
||||
|
||||
class Transaction(JsonEncodedObject):
|
||||
|
@ -75,10 +65,7 @@ class Transaction(JsonEncodedObject):
|
|||
"edus",
|
||||
]
|
||||
|
||||
internal_keys = [
|
||||
"transaction_id",
|
||||
"destination",
|
||||
]
|
||||
internal_keys = ["transaction_id", "destination"]
|
||||
|
||||
required_keys = [
|
||||
"transaction_id",
|
||||
|
@ -98,9 +85,7 @@ class Transaction(JsonEncodedObject):
|
|||
del kwargs["edus"]
|
||||
|
||||
super(Transaction, self).__init__(
|
||||
transaction_id=transaction_id,
|
||||
pdus=pdus,
|
||||
**kwargs
|
||||
transaction_id=transaction_id, pdus=pdus, **kwargs
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
@ -109,13 +94,9 @@ class Transaction(JsonEncodedObject):
|
|||
transaction_id and origin_server_ts keys.
|
||||
"""
|
||||
if "origin_server_ts" not in kwargs:
|
||||
raise KeyError(
|
||||
"Require 'origin_server_ts' to construct a Transaction"
|
||||
)
|
||||
raise KeyError("Require 'origin_server_ts' to construct a Transaction")
|
||||
if "transaction_id" not in kwargs:
|
||||
raise KeyError(
|
||||
"Require 'transaction_id' to construct a Transaction"
|
||||
)
|
||||
raise KeyError("Require 'transaction_id' to construct a Transaction")
|
||||
|
||||
kwargs["pdus"] = [p.get_pdu_json() for p in pdus]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue