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"]
|
content["result"] = out["result"]
|
||||||
if "error" in out:
|
if "error" in out:
|
||||||
content["error"] = out["error"]
|
content["error"] = out["error"]
|
||||||
|
raw_tags = out.get("tags")
|
||||||
|
tags = list(raw_tags) if isinstance(raw_tags, list) else []
|
||||||
# Prepare response event
|
# Prepare response event
|
||||||
res: dict = {
|
res: dict = {
|
||||||
"kind": 23195,
|
"kind": 23195,
|
||||||
"created_at": int(time.time()),
|
"created_at": int(time.time()),
|
||||||
"tags": list(out.get("tags", [])),
|
"tags": tags,
|
||||||
"content": self._json_dumps(content),
|
"content": self._json_dumps(content),
|
||||||
}
|
}
|
||||||
# Reference request
|
# Reference request
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue