Skip to content

refactor: update emoji package to 2.0.0 #8426

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion stubs/emoji/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "1.7.*"
version = "2.0.*"

[tool.stubtest]
ignore_missing_stub = false
40 changes: 20 additions & 20 deletions stubs/emoji/emoji/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
from .core import (
demojize as demojize,
distinct_emoji_lis as distinct_emoji_lis,
distinct_emoji_list as distinct_emoji_list,
emoji_count as emoji_count,
emoji_lis as emoji_lis,
emoji_list as emoji_list,
emojize as emojize,
get_emoji_regexp as get_emoji_regexp,
is_emoji as is_emoji,
replace_emoji as replace_emoji,
version as version,
)
from .unicode_codes import (
EMOJI_ALIAS_UNICODE_ENGLISH as EMOJI_ALIAS_UNICODE_ENGLISH,
EMOJI_DATA as EMOJI_DATA,
EMOJI_UNICODE_ENGLISH as EMOJI_UNICODE_ENGLISH,
EMOJI_UNICODE_FRENCH as EMOJI_UNICODE_FRENCH,
EMOJI_UNICODE_GERMAN as EMOJI_UNICODE_GERMAN,
EMOJI_UNICODE_ITALIAN as EMOJI_UNICODE_ITALIAN,
EMOJI_UNICODE_PORTUGUESE as EMOJI_UNICODE_PORTUGUESE,
EMOJI_UNICODE_SPANISH as EMOJI_UNICODE_SPANISH,
UNICODE_EMOJI_ALIAS_ENGLISH as UNICODE_EMOJI_ALIAS_ENGLISH,
UNICODE_EMOJI_ENGLISH as UNICODE_EMOJI_ENGLISH,
UNICODE_EMOJI_FRENCH as UNICODE_EMOJI_FRENCH,
UNICODE_EMOJI_GERMAN as UNICODE_EMOJI_GERMAN,
UNICODE_EMOJI_ITALIAN as UNICODE_EMOJI_ITALIAN,
UNICODE_EMOJI_PORTUGUESE as UNICODE_EMOJI_PORTUGUESE,
UNICODE_EMOJI_SPANISH as UNICODE_EMOJI_SPANISH,
)
from .unicode_codes import EMOJI_DATA, LANGUAGES, STATUS

__all__ = [
"emojize",
"demojize",
"emoji_count",
"emoji_list",
"distinct_emoji_list",
"replace_emoji",
"version",
"is_emoji",
"EMOJI_DATA",
"STATUS",
"LANGUAGES",
]
__version__: str
__author__: str
__email__: str
__source__: str
__license__: str
15 changes: 1 addition & 14 deletions stubs/emoji/emoji/core.pyi
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
from collections.abc import Callable
from re import Pattern
from typing_extensions import Literal, TypedDict

_DEFAULT_DELIMITER: str

class _DeprecatedParameter: ...

class _EmojiLisReturn(TypedDict):
emoji: str
location: int
Expand All @@ -17,7 +14,6 @@ class _EmojiListReturn(TypedDict):

def emojize(
string: str,
use_aliases: bool | type[_DeprecatedParameter] = ...,
delimiters: tuple[str, str] = ...,
variant: Literal["text_type", "emoji_type", None] = ...,
language: str = ...,
Expand All @@ -26,22 +22,13 @@ def emojize(
) -> str: ...
def demojize(
string: str,
use_aliases: bool | type[_DeprecatedParameter] = ...,
delimiters: tuple[str, str] = ...,
language: str = ...,
version: float | None = ...,
handle_version: str | Callable[[str, dict[str, str]], str] | None = ...,
) -> str: ...
def replace_emoji(
string: str,
replace: str | Callable[[str, dict[str, str]], str] = ...,
language: str | type[_DeprecatedParameter] = ...,
version: float | None = ...,
) -> str: ...
def get_emoji_regexp(language: str | None = ...) -> Pattern[str]: ...
def emoji_lis(string: str, language: str | type[_DeprecatedParameter] = ...) -> list[_EmojiLisReturn]: ...
def replace_emoji(string: str, replace: str | Callable[[str, dict[str, str]], str] = ..., version: float = ...) -> str: ...
def emoji_list(string: str) -> list[_EmojiListReturn]: ...
def distinct_emoji_lis(string: str, language: str | type[_DeprecatedParameter] = ...) -> list[str]: ...
def distinct_emoji_list(string: str) -> list[str]: ...
def emoji_count(string: str, unique: bool = ...) -> int: ...
def version(string: str) -> float: ...
Expand Down
28 changes: 4 additions & 24 deletions stubs/emoji/emoji/unicode_codes/__init__.pyi
Original file line number Diff line number Diff line change
@@ -1,26 +1,6 @@
EMOJI_ALIAS_UNICODE_ENGLISH: dict[str, str]
EMOJI_UNICODE_ENGLISH: dict[str, str]
UNICODE_EMOJI_ENGLISH: dict[str, str]
UNICODE_EMOJI_ALIAS_ENGLISH: dict[str, str]
from .data_dict import *

EMOJI_UNICODE_GERMAN: dict[str, str]
UNICODE_EMOJI_GERMAN: dict[str, str]
__all__ = ["get_emoji_unicode_dict", "get_aliases_unicode_dict", "EMOJI_DATA", "STATUS", "LANGUAGES"]

EMOJI_UNICODE_SPANISH: dict[str, str]
UNICODE_EMOJI_SPANISH: dict[str, str]

EMOJI_UNICODE_FRENCH: dict[str, str]
UNICODE_EMOJI_FRENCH: dict[str, str]

EMOJI_UNICODE_ITALIAN: dict[str, str]
UNICODE_EMOJI_ITALIAN: dict[str, str]

EMOJI_UNICODE_PORTUGUESE: dict[str, str]
UNICODE_EMOJI_PORTUGUESE: dict[str, str]

EMOJI_UNICODE: dict[str, dict[str, str]]
UNICODE_EMOJI: dict[str, dict[str, str]]

EMOJI_DATA: dict[str, dict[str, str]]

STATUS: dict[str, int]
def get_emoji_unicode_dict(lang: str) -> dict[str, str]: ...
def get_aliases_unicode_dict() -> dict[str, str]: ...
6 changes: 4 additions & 2 deletions stubs/emoji/emoji/unicode_codes/data_dict.pyi
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from _typeshed import Incomplete

STATUS: Incomplete
EMOJI_DATA: Incomplete
__all__ = ["EMOJI_DATA", "STATUS", "LANGUAGES"]
STATUS: dict[str, int]
LANGUAGES: list[str]
EMOJI_DATA: dict[str, dict[str, Incomplete]]