From 1865d111df5249e4bcb41a0c51d8b6f24f485a91 Mon Sep 17 00:00:00 2001 From: "WQY\\qiong" Date: Mon, 14 Nov 2022 21:37:49 +0800 Subject: [PATCH] Parse [REACTIONS], only support inp out --- api/s19_reactions.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/api/s19_reactions.py b/api/s19_reactions.py index be46b66..1222cc8 100644 --- a/api/s19_reactions.py +++ b/api/s19_reactions.py @@ -60,15 +60,15 @@ def set_reaction(name: str, cs: ChangeSet) -> ChangeSet: return execute_command(name, set_reaction_cache(name, cs)) -def inp_in_reaction(section: list[str]) -> ChangeSet: - cs = g_update_prefix | { 'type' : 'reaction' } - for s in section: - line = s.upper().strip() - for key in get_reaction_schema('').keys(): - if line.startswith(key): - value = line.removeprefix(key).strip() - cs |= { key : value } - return ChangeSet(cs) +# def inp_in_reaction(section: list[str]) -> ChangeSet: +# cs = g_update_prefix | { 'type' : 'reaction' } +# for s in section: +# line = s.upper().strip() +# for key in get_reaction_schema('').keys(): +# if line.startswith(key): +# value = line.removeprefix(key).strip() +# cs |= { key : value } +# return ChangeSet(cs) def inp_out_reaction(name: str) -> list[str]: