Remove emoji stubs (#10160)

Remove `emoji` stubs, refs #8760
This commit is contained in:
Nikita Sobolev
2023-05-09 11:28:11 +03:00
committed by GitHub
parent 9457de310a
commit a2457367d0
6 changed files with 1 additions and 76 deletions

View File

@@ -280,7 +280,7 @@ async def get_diff_info(
versions_to_tags: dict[packaging.version.Version, str] = {}
for tag in github_info.tags:
tag_name = tag["name"]
# Some packages in typeshed (e.g. emoji) have tag names
# Some packages in typeshed have tag names
# that are invalid to be passed to the Version() constructor,
# e.g. v.1.4.2
with contextlib.suppress(packaging.version.InvalidVersion):

View File

@@ -1,2 +0,0 @@
version = "2.1.*"
obsolete_since = "2.2.0" # Released on 2022-10-31

View File

@@ -1,30 +0,0 @@
from .core import (
demojize as demojize,
distinct_emoji_list as distinct_emoji_list,
emoji_count as emoji_count,
emoji_list as emoji_list,
emojize as emojize,
is_emoji as is_emoji,
replace_emoji as replace_emoji,
version as version,
)
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,31 +0,0 @@
from collections.abc import Callable
from typing_extensions import Literal, TypedDict
_DEFAULT_DELIMITER: str
class _EmojiListReturn(TypedDict):
emoji: str
match_start: int
match_end: int
def emojize(
string: str,
delimiters: tuple[str, str] = (":", ":"),
variant: Literal["text_type", "emoji_type", None] = None,
language: str = "en",
version: float | None = None,
handle_version: str | Callable[[str, dict[str, str]], str] | None = None,
) -> str: ...
def demojize(
string: str,
delimiters: tuple[str, str] = (":", ":"),
language: str = "en",
version: float | None = None,
handle_version: str | Callable[[str, dict[str, str]], str] | None = None,
) -> str: ...
def replace_emoji(string: str, replace: str | Callable[[str, dict[str, str]], str] = "", version: float = -1) -> str: ...
def emoji_list(string: str) -> list[_EmojiListReturn]: ...
def distinct_emoji_list(string: str) -> list[str]: ...
def emoji_count(string: str, unique: bool = False) -> int: ...
def version(string: str) -> float: ...
def is_emoji(string: str) -> bool: ...

View File

@@ -1,6 +0,0 @@
from .data_dict import *
__all__ = ["get_emoji_unicode_dict", "get_aliases_unicode_dict", "EMOJI_DATA", "STATUS", "LANGUAGES"]
def get_emoji_unicode_dict(lang: str) -> dict[str, str]: ...
def get_aliases_unicode_dict() -> dict[str, str]: ...

View File

@@ -1,6 +0,0 @@
from _typeshed import Incomplete
__all__ = ["EMOJI_DATA", "STATUS", "LANGUAGES"]
STATUS: dict[str, int]
LANGUAGES: list[str]
EMOJI_DATA: dict[str, dict[str, Incomplete]]