Skip to content

Commit e48c176

Browse files
author
Kevin Kirsche
authored
Update emoji stubs for v2.0.0 (#8426)
1 parent 1f0e641 commit e48c176

File tree

5 files changed

+30
-61
lines changed

5 files changed

+30
-61
lines changed

stubs/emoji/METADATA.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "1.7.*"
1+
version = "2.0.*"
22

33
[tool.stubtest]
44
ignore_missing_stub = false

stubs/emoji/emoji/__init__.pyi

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
from .core import (
22
demojize as demojize,
3-
distinct_emoji_lis as distinct_emoji_lis,
43
distinct_emoji_list as distinct_emoji_list,
54
emoji_count as emoji_count,
6-
emoji_lis as emoji_lis,
75
emoji_list as emoji_list,
86
emojize as emojize,
9-
get_emoji_regexp as get_emoji_regexp,
107
is_emoji as is_emoji,
118
replace_emoji as replace_emoji,
129
version as version,
1310
)
14-
from .unicode_codes import (
15-
EMOJI_ALIAS_UNICODE_ENGLISH as EMOJI_ALIAS_UNICODE_ENGLISH,
16-
EMOJI_DATA as EMOJI_DATA,
17-
EMOJI_UNICODE_ENGLISH as EMOJI_UNICODE_ENGLISH,
18-
EMOJI_UNICODE_FRENCH as EMOJI_UNICODE_FRENCH,
19-
EMOJI_UNICODE_GERMAN as EMOJI_UNICODE_GERMAN,
20-
EMOJI_UNICODE_ITALIAN as EMOJI_UNICODE_ITALIAN,
21-
EMOJI_UNICODE_PORTUGUESE as EMOJI_UNICODE_PORTUGUESE,
22-
EMOJI_UNICODE_SPANISH as EMOJI_UNICODE_SPANISH,
23-
UNICODE_EMOJI_ALIAS_ENGLISH as UNICODE_EMOJI_ALIAS_ENGLISH,
24-
UNICODE_EMOJI_ENGLISH as UNICODE_EMOJI_ENGLISH,
25-
UNICODE_EMOJI_FRENCH as UNICODE_EMOJI_FRENCH,
26-
UNICODE_EMOJI_GERMAN as UNICODE_EMOJI_GERMAN,
27-
UNICODE_EMOJI_ITALIAN as UNICODE_EMOJI_ITALIAN,
28-
UNICODE_EMOJI_PORTUGUESE as UNICODE_EMOJI_PORTUGUESE,
29-
UNICODE_EMOJI_SPANISH as UNICODE_EMOJI_SPANISH,
30-
)
11+
from .unicode_codes import EMOJI_DATA, LANGUAGES, STATUS
12+
13+
__all__ = [
14+
"emojize",
15+
"demojize",
16+
"emoji_count",
17+
"emoji_list",
18+
"distinct_emoji_list",
19+
"replace_emoji",
20+
"version",
21+
"is_emoji",
22+
"EMOJI_DATA",
23+
"STATUS",
24+
"LANGUAGES",
25+
]
26+
__version__: str
27+
__author__: str
28+
__email__: str
29+
__source__: str
30+
__license__: str

stubs/emoji/emoji/core.pyi

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
from collections.abc import Callable
2-
from re import Pattern
32
from typing_extensions import Literal, TypedDict
43

54
_DEFAULT_DELIMITER: str
65

7-
class _DeprecatedParameter: ...
8-
96
class _EmojiLisReturn(TypedDict):
107
emoji: str
118
location: int
@@ -17,7 +14,6 @@ class _EmojiListReturn(TypedDict):
1714

1815
def emojize(
1916
string: str,
20-
use_aliases: bool | type[_DeprecatedParameter] = ...,
2117
delimiters: tuple[str, str] = ...,
2218
variant: Literal["text_type", "emoji_type", None] = ...,
2319
language: str = ...,
@@ -26,22 +22,13 @@ def emojize(
2622
) -> str: ...
2723
def demojize(
2824
string: str,
29-
use_aliases: bool | type[_DeprecatedParameter] = ...,
3025
delimiters: tuple[str, str] = ...,
3126
language: str = ...,
3227
version: float | None = ...,
3328
handle_version: str | Callable[[str, dict[str, str]], str] | None = ...,
3429
) -> str: ...
35-
def replace_emoji(
36-
string: str,
37-
replace: str | Callable[[str, dict[str, str]], str] = ...,
38-
language: str | type[_DeprecatedParameter] = ...,
39-
version: float | None = ...,
40-
) -> str: ...
41-
def get_emoji_regexp(language: str | None = ...) -> Pattern[str]: ...
42-
def emoji_lis(string: str, language: str | type[_DeprecatedParameter] = ...) -> list[_EmojiLisReturn]: ...
30+
def replace_emoji(string: str, replace: str | Callable[[str, dict[str, str]], str] = ..., version: float = ...) -> str: ...
4331
def emoji_list(string: str) -> list[_EmojiListReturn]: ...
44-
def distinct_emoji_lis(string: str, language: str | type[_DeprecatedParameter] = ...) -> list[str]: ...
4532
def distinct_emoji_list(string: str) -> list[str]: ...
4633
def emoji_count(string: str, unique: bool = ...) -> int: ...
4734
def version(string: str) -> float: ...
Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,6 @@
1-
EMOJI_ALIAS_UNICODE_ENGLISH: dict[str, str]
2-
EMOJI_UNICODE_ENGLISH: dict[str, str]
3-
UNICODE_EMOJI_ENGLISH: dict[str, str]
4-
UNICODE_EMOJI_ALIAS_ENGLISH: dict[str, str]
1+
from .data_dict import *
52

6-
EMOJI_UNICODE_GERMAN: dict[str, str]
7-
UNICODE_EMOJI_GERMAN: dict[str, str]
3+
__all__ = ["get_emoji_unicode_dict", "get_aliases_unicode_dict", "EMOJI_DATA", "STATUS", "LANGUAGES"]
84

9-
EMOJI_UNICODE_SPANISH: dict[str, str]
10-
UNICODE_EMOJI_SPANISH: dict[str, str]
11-
12-
EMOJI_UNICODE_FRENCH: dict[str, str]
13-
UNICODE_EMOJI_FRENCH: dict[str, str]
14-
15-
EMOJI_UNICODE_ITALIAN: dict[str, str]
16-
UNICODE_EMOJI_ITALIAN: dict[str, str]
17-
18-
EMOJI_UNICODE_PORTUGUESE: dict[str, str]
19-
UNICODE_EMOJI_PORTUGUESE: dict[str, str]
20-
21-
EMOJI_UNICODE: dict[str, dict[str, str]]
22-
UNICODE_EMOJI: dict[str, dict[str, str]]
23-
24-
EMOJI_DATA: dict[str, dict[str, str]]
25-
26-
STATUS: dict[str, int]
5+
def get_emoji_unicode_dict(lang: str) -> dict[str, str]: ...
6+
def get_aliases_unicode_dict() -> dict[str, str]: ...
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
from _typeshed import Incomplete
22

3-
STATUS: Incomplete
4-
EMOJI_DATA: Incomplete
3+
__all__ = ["EMOJI_DATA", "STATUS", "LANGUAGES"]
4+
STATUS: dict[str, int]
5+
LANGUAGES: list[str]
6+
EMOJI_DATA: dict[str, dict[str, Incomplete]]

0 commit comments

Comments
 (0)