From 0ee7b26ce1fd907aec1c7c0fbbdbf444cff0bbd0 Mon Sep 17 00:00:00 2001 From: Eric Traut Date: Mon, 10 Aug 2020 13:34:47 -0700 Subject: [PATCH] Contributed stubs for slugify package (#4429) Co-authored-by: Eric Traut Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> --- third_party/2and3/slugify/__init__.pyi | 2 ++ third_party/2and3/slugify/slugify.pyi | 19 +++++++++++++++++++ third_party/2and3/slugify/special.pyi | 8 ++++++++ 3 files changed, 29 insertions(+) create mode 100644 third_party/2and3/slugify/__init__.pyi create mode 100644 third_party/2and3/slugify/slugify.pyi create mode 100644 third_party/2and3/slugify/special.pyi diff --git a/third_party/2and3/slugify/__init__.pyi b/third_party/2and3/slugify/__init__.pyi new file mode 100644 index 000000000..1a7847377 --- /dev/null +++ b/third_party/2and3/slugify/__init__.pyi @@ -0,0 +1,2 @@ +from .slugify import * +from .special import * diff --git a/third_party/2and3/slugify/slugify.pyi b/third_party/2and3/slugify/slugify.pyi new file mode 100644 index 000000000..a51c78732 --- /dev/null +++ b/third_party/2and3/slugify/slugify.pyi @@ -0,0 +1,19 @@ +from typing import Iterable, Optional + +def smart_truncate( + string: str, max_length: int = ..., word_boundary: bool = ..., separator: str = ..., save_order: bool = ... +) -> str: ... +def slugify( + text: str, + entities: bool = ..., + decimal: bool = ..., + hexadecimal: bool = ..., + max_length: int = ..., + word_boundary: bool = ..., + separator: str = ..., + save_order: bool = ..., + stopwords: Iterable[str] = ..., + regex_pattern: Optional[str] = ..., + lowercase: bool = ..., + replacements: Iterable[str] = ..., +) -> str: ... diff --git a/third_party/2and3/slugify/special.pyi b/third_party/2and3/slugify/special.pyi new file mode 100644 index 000000000..05e076177 --- /dev/null +++ b/third_party/2and3/slugify/special.pyi @@ -0,0 +1,8 @@ +from typing import Sequence, Tuple + +def add_uppercase_char(char_list: Sequence[Tuple[str, str]]) -> Sequence[Tuple[str, str]]: ... + +CYRILLIC: Sequence[Tuple[str, str]] +GERMAN: Sequence[Tuple[str, str]] +GREEK: Sequence[Tuple[str, str]] +PRE_TRANSLATIONS: Sequence[Tuple[str, str]]