mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-11-11 21:56:35 -05:00
Fixed code misc. quality issues (#9649)
- Merge 'isinstance' calls. - Remove unnecessary dict call outside of comprehension. - Use 'sys.exit()' calls.
This commit is contained in:
parent
d600d4506b
commit
d66f9070cd
4 changed files with 4 additions and 3 deletions
|
|
@ -290,7 +290,7 @@ class HttpPusher(Pusher):
|
|||
if rejected is False:
|
||||
return False
|
||||
|
||||
if isinstance(rejected, list) or isinstance(rejected, tuple):
|
||||
if isinstance(rejected, (list, tuple)):
|
||||
for pk in rejected:
|
||||
if pk != self.pushkey:
|
||||
# for sanity, we only remove the pushkey if it
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ def freeze(o):
|
|||
|
||||
def unfreeze(o):
|
||||
if isinstance(o, (dict, frozendict)):
|
||||
return dict({k: unfreeze(v) for k, v in o.items()})
|
||||
return {k: unfreeze(v) for k, v in o.items()}
|
||||
|
||||
if isinstance(o, (bytes, str)):
|
||||
return o
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue