Reformatted code base using black.
This commit is contained in:
parent
56319cbad3
commit
53fdaa9d09
1 changed files with 12604 additions and 8966 deletions
|
|
@ -72,7 +72,7 @@ class XEP_0422(object):
|
|||
clear: Optional[bool] = None,
|
||||
shell: Optional[bool] = None,
|
||||
children: Optional[List[domish.Element]] = None,
|
||||
external: Optional[List[Union[str, Tuple[str, str]]]] = None
|
||||
external: Optional[List[Union[str, Tuple[str, str]]]] = None,
|
||||
) -> domish.Element:
|
||||
"""Generate, add and return <apply-to> element
|
||||
|
||||
|
|
@ -112,9 +112,7 @@ class XEP_0422(object):
|
|||
|
||||
@async_lru(maxsize=5)
|
||||
async def get_fastened_elts(
|
||||
self,
|
||||
client: SatXMPPEntity,
|
||||
message_elt: domish.Element
|
||||
self, client: SatXMPPEntity, message_elt: domish.Element
|
||||
) -> Optional[FastenMetadata]:
|
||||
"""Get fastened elements
|
||||
|
||||
|
|
@ -127,9 +125,7 @@ class XEP_0422(object):
|
|||
else:
|
||||
origin_id = apply_to_elt.getAttribute("id")
|
||||
if not origin_id:
|
||||
log.warning(
|
||||
f"Received invalid fastening message: {message_elt.toXml()}"
|
||||
)
|
||||
log.warning(f"Received invalid fastening message: {message_elt.toXml()}")
|
||||
return None
|
||||
elements = apply_to_elt.children
|
||||
if not elements:
|
||||
|
|
@ -140,7 +136,7 @@ class XEP_0422(object):
|
|||
History,
|
||||
History.origin_id,
|
||||
origin_id,
|
||||
(History.messages, History.subjects, History.thread)
|
||||
(History.messages, History.subjects, History.thread),
|
||||
)
|
||||
return FastenMetadata(
|
||||
elements,
|
||||
|
|
|
|||
Loading…
Reference in a new issue