|
| 1 | +from typing import Iterable, Iterator, Literal |
| 2 | + |
| 3 | +from nameparser.config import CONSTANTS, DEFAULT_ENCODING, Constants |
| 4 | + |
| 5 | +ENCODING: str |
| 6 | + |
| 7 | + |
| 8 | +def group_contiguous_integers(data: Iterable[int]) -> list[tuple[int, int]]: |
| 9 | + ... |
| 10 | + |
| 11 | + |
| 12 | +class HumanName: |
| 13 | + C: Constants |
| 14 | + original: str |
| 15 | + unparsable: bool |
| 16 | + encoding: str |
| 17 | + string_format: str |
| 18 | + initials_format: str |
| 19 | + initials_delimiter: str |
| 20 | + |
| 21 | + def __init__( |
| 22 | + self, |
| 23 | + full_name: str = '', |
| 24 | + constants: Constants = CONSTANTS, |
| 25 | + encoding: str = DEFAULT_ENCODING, |
| 26 | + string_format: str | None = None, |
| 27 | + initials_format: str | None = None, |
| 28 | + initials_delimiter: str | None = None, |
| 29 | + first: str | None = None, |
| 30 | + middle: str | None = None, |
| 31 | + last: str | None = None, |
| 32 | + title: str | None = None, |
| 33 | + suffix: str | None = None, |
| 34 | + nickname: str | None = None, |
| 35 | + ) -> None: ... |
| 36 | + |
| 37 | + def __iter__(self) -> Iterator[str]: ... |
| 38 | + def __len__(self) -> int: ... |
| 39 | + def __eq__(self, other: object) -> bool: ... |
| 40 | + def __ne__(self, other: object) -> bool: ... |
| 41 | + def __getitem__(self, key: str | slice[int, int, int | None]) -> str: ... |
| 42 | + def __setitem__(self, key: str, value: str | Iterable[str]) -> None: ... |
| 43 | + def next(self) -> str: ... |
| 44 | + def __next__(self) -> str: ... |
| 45 | + def __hash__(self) -> int: ... |
| 46 | + def as_dict(self, include_empty: bool = True) -> dict[str, str]: ... |
| 47 | + def initials_list(self) -> list[str]: ... |
| 48 | + def initials(self) -> list[str]: ... |
| 49 | + @property |
| 50 | + def has_own_config(self) -> bool: ... |
| 51 | + @property |
| 52 | + def title(self) -> str: ... |
| 53 | + @title.setter |
| 54 | + def title(self, value: str) -> str: ... |
| 55 | + @property |
| 56 | + def first(self) -> str: ... |
| 57 | + @first.setter |
| 58 | + def first(self, value: str) -> str: ... |
| 59 | + @property |
| 60 | + def middle(self) -> str: ... |
| 61 | + @middle.setter |
| 62 | + def middle(self, value: str) -> str: ... |
| 63 | + @property |
| 64 | + def last(self) -> str: ... |
| 65 | + @last.setter |
| 66 | + def last(self, value: str) -> str: ... |
| 67 | + @property |
| 68 | + def suffix(self) -> str: ... |
| 69 | + @suffix.setter |
| 70 | + def suffix(self, value: str) -> str: ... |
| 71 | + @property |
| 72 | + def nickname(self) -> str: ... |
| 73 | + @nickname.setter |
| 74 | + def nickname(self, value: str) -> str: ... |
| 75 | + @property |
| 76 | + def surnames_list(self) -> list[str]: ... |
| 77 | + @property |
| 78 | + def surnames(self) -> str: ... |
| 79 | + def is_title(self, value: str)-> bool: ... |
| 80 | + def is_conjunction(self, piece: str)-> bool: ... |
| 81 | + def is_prefix(self, piece: str)-> bool: ... |
| 82 | + def is_roman_numeral(self, value: str)-> bool: ... |
| 83 | + def is_suffix(self, piece: str)-> bool: ... |
| 84 | + def are_suffixes(self, pieces: str)-> bool: ... |
| 85 | + def is_rootname(self, piece: str)-> bool: ... |
| 86 | + def is_an_initial(self, value: str)-> bool: ... |
| 87 | + full_name: str |
| 88 | + def collapse_whitespace(self, string: str) -> str: ... |
| 89 | + def pre_process(self) -> None: ... |
| 90 | + def post_process(self) -> None: ... |
| 91 | + def fix_phd(self) -> None: ... |
| 92 | + def parse_nicknames(self) -> None: ... |
| 93 | + def squash_emoji(self) -> None: ... |
| 94 | + def handle_firstnames(self) -> None: ... |
| 95 | + title_list: list[str] |
| 96 | + first_list: list[str] |
| 97 | + middle_list: list[str] |
| 98 | + last_list: list[str] |
| 99 | + suffix_list: list[str] |
| 100 | + nickname_list: list[str] |
| 101 | + def parse_full_name(self) -> None: ... |
| 102 | + def parse_pieces(self, parts: Iterable[str], additional_parts_count: int = 0) -> str: ... |
| 103 | + def join_on_conjunctions(self, pieces: Iterable[str], additional_parts_count: int = 0) -> str: ... |
| 104 | + def cap_word(self, word: str, attribute: Literal['title', 'first', 'middle', 'last', 'suffix', 'nickname', 'surnames']) -> str: ... |
| 105 | + def cap_piece(self, piece: str, attribute: Literal['title', 'first', 'middle', 'last', 'suffix', 'nickname', 'surnames']) -> str: ... |
| 106 | + def capitalize(self, force: bool | None = None) -> None: ... |
| 107 | + def handle_capitalization(self) -> None: ... |
0 commit comments