Strengthen types for linter
This commit is contained in:
parent
08070257f8
commit
5d70b9f427
1 changed files with 3 additions and 1 deletions
4
nwcp.py
4
nwcp.py
|
|
@ -352,11 +352,13 @@ class NWCServiceProvider:
|
|||
content["result"] = out["result"]
|
||||
if "error" in out:
|
||||
content["error"] = out["error"]
|
||||
raw_tags = out.get("tags")
|
||||
tags = list(raw_tags) if isinstance(raw_tags, list) else []
|
||||
# Prepare response event
|
||||
res: dict = {
|
||||
"kind": 23195,
|
||||
"created_at": int(time.time()),
|
||||
"tags": list(out.get("tags", [])),
|
||||
"tags": tags,
|
||||
"content": self._json_dumps(content),
|
||||
}
|
||||
# Reference request
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue