From f876b39e4c54f25af33ac9c9438c8de1b00b41bc Mon Sep 17 00:00:00 2001 From: vmonakhov Date: Tue, 25 Jun 2024 17:40:37 +0300 Subject: [PATCH] fixed warnings --- lingvodoc/utils/creation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lingvodoc/utils/creation.py b/lingvodoc/utils/creation.py index 8eaa3f10..b0a15809 100644 --- a/lingvodoc/utils/creation.py +++ b/lingvodoc/utils/creation.py @@ -615,7 +615,7 @@ def f(tag): if id and state: word_dict['id'] = id word_dict['state'] = state - if type(word_dict['state']) == list: + if type(word_dict['state']) is list: word_dict['state'] = ' '.join(word_dict['state']) word_dict['results'] = [] item_to_store = word_dict @@ -629,7 +629,7 @@ def f(tag): res = json.loads(ann.text) res['id'] = ann.get('id') res['state'] = ann.get('class') - if type(res['state'] == list): + if type(res['state'] is list): res['state'] = ' '.join(res['state']) word_dict['results'].append(res)