Update emoji stubs for v2.0.0 (#8426)

This commit is contained in:
Kevin Kirsche
2022-07-28 13:29:35 -04:00
committed by GitHub
parent 1f0e641521
commit e48c176e7b
5 changed files with 30 additions and 61 deletions

View File

@@ -1,4 +1,4 @@
version = "1.7.*"
version = "2.0.*"
[tool.stubtest]
ignore_missing_stub = false

View File

@@ -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

View File

@@ -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
@@ -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 = ...,
@@ -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: ...

View File

@@ -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]: ...

View File

@@ -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]]