misc: pylint fix unidiomatic-typecheck (#52630)

This commit is contained in:
Lauréline Guérin 2021-04-02 14:42:01 +02:00
parent 43807dadcd
commit 5c49177e48
No known key found for this signature in database
GPG Key ID: 1FAB9B9B4F93D473
1 changed files with 3 additions and 3 deletions

View File

@ -158,9 +158,9 @@ def test_simplify_mix():
def test_json_str_decoder():
json_str = json.dumps({'lst': [{'a': 'b'}, 1, 2], 'bla': u'éléphant'})
assert type(list(json_loads(json_str).keys())[0]) is str
assert type(json_loads(json_str)['lst'][0]['a']) is str
assert type(json_loads(json_str)['bla']) is str
assert isinstance(list(json_loads(json_str).keys())[0], str)
assert isinstance(json_loads(json_str)['lst'][0]['a'], str)
assert isinstance(json_loads(json_str)['bla'], str)
assert json_loads(json_str)['bla'] == force_str(u'éléphant')