Skip to content

Commit 5c4b915

Browse files
authored
Merge pull request #318 from allrob23/master
2 parents 08c5cc4 + 45e5785 commit 5c4b915

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

emoji/unicode_codes/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from functools import lru_cache
55
from warnings import warn
66

7-
from typing import Any, BinaryIO, Dict, List, Optional
7+
from typing import Any, BinaryIO, Dict, Optional, Set
88

99
from emoji.unicode_codes.data_dict import STATUS, LANGUAGES
1010

@@ -18,7 +18,7 @@
1818

1919
_DEFAULT_KEYS = ('en', 'alias', 'E', 'status') # The keys in emoji.json
2020

21-
_loaded_keys: List[str] = list(
21+
_loaded_keys: Set[str] = set(
2222
_DEFAULT_KEYS
2323
) # Keep track of keys already loaded from json files to avoid loading them twice
2424

@@ -89,7 +89,7 @@ def _load_default_from_json():
8989

9090
with _open_file('emoji.json') as f:
9191
EMOJI_DATA = dict(json.load(f, object_pairs_hook=EmojiDataDict)) # type: ignore
92-
_loaded_keys = list(_DEFAULT_KEYS)
92+
_loaded_keys = set(_DEFAULT_KEYS)
9393

9494

9595
def load_from_json(key: str):
@@ -105,7 +105,7 @@ def load_from_json(key: str):
105105
for emj, value in json.load(f).items():
106106
EMOJI_DATA[emj][key] = value # type: ignore
107107

108-
_loaded_keys.append(key)
108+
_loaded_keys.add(key)
109109

110110

111111
_load_default_from_json()

0 commit comments

Comments
 (0)