mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-06-21 08:04:09 -04:00
Add missing type hints to synapse.appservice
(#11360)
This commit is contained in:
parent
70ca05373b
commit
2519beaad2
7 changed files with 148 additions and 93 deletions
|
@ -147,8 +147,7 @@ def _load_appservice(
|
|||
# protocols check
|
||||
protocols = as_info.get("protocols")
|
||||
if protocols:
|
||||
# Because strings are lists in python
|
||||
if isinstance(protocols, str) or not isinstance(protocols, list):
|
||||
if not isinstance(protocols, list):
|
||||
raise KeyError("Optional 'protocols' must be a list if present.")
|
||||
for p in protocols:
|
||||
if not isinstance(p, str):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue