speed up ==, hash, <, >, <=, and >= for plain_data
[nmutil.git] / src / nmutil / plain_data.pyi
1 # SPDX-License-Identifier: LGPL-3-or-later
2 # Copyright 2022 Jacob Lifshay programmerjake@gmail.com
3
4 from typing import TypeVar, Type, Callable, Any
5
6 _T = TypeVar("_T")
7
8
9 class FrozenPlainDataError(AttributeError):
10 pass
11
12
13 def plain_data(*, eq: bool = True, unsafe_hash: bool = False,
14 order: bool = False, repr: bool = True,
15 frozen: bool = False) -> Callable[[Type[_T]], Type[_T]]:
16 ...
17
18
19 def fields(pd: Any) -> tuple[str, ...]:
20 ...
21
22
23 def replace(pd: _T, **changes: Any) -> _T:
24 ...