mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Contributed stubs for slugify package (#4429)
Co-authored-by: Eric Traut <erictr@microsoft.com> Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com>
This commit is contained in:
2
third_party/2and3/slugify/__init__.pyi
vendored
Normal file
2
third_party/2and3/slugify/__init__.pyi
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
from .slugify import *
|
||||
from .special import *
|
||||
19
third_party/2and3/slugify/slugify.pyi
vendored
Normal file
19
third_party/2and3/slugify/slugify.pyi
vendored
Normal file
@@ -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: ...
|
||||
8
third_party/2and3/slugify/special.pyi
vendored
Normal file
8
third_party/2and3/slugify/special.pyi
vendored
Normal file
@@ -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]]
|
||||
Reference in New Issue
Block a user