1 from __future__ import absolute_import, division, print_function |
1 # SPDX-License-Identifier: MIT |
2 |
2 |
3 from ._funcs import ( |
3 |
4 asdict, |
4 import sys |
5 assoc, |
5 |
6 astuple, |
6 from functools import partial |
7 evolve, |
7 |
8 has, |
8 from . import converters, exceptions, filters, setters, validators |
9 ) |
9 from ._cmp import cmp_using |
|
10 from ._config import get_run_validators, set_run_validators |
|
11 from ._funcs import asdict, assoc, astuple, evolve, has, resolve_types |
10 from ._make import ( |
12 from ._make import ( |
|
13 NOTHING, |
11 Attribute, |
14 Attribute, |
12 Factory, |
15 Factory, |
13 NOTHING, |
16 attrib, |
14 attr, |
17 attrs, |
15 attributes, |
|
16 fields, |
18 fields, |
|
19 fields_dict, |
17 make_class, |
20 make_class, |
18 validate, |
21 validate, |
19 ) |
22 ) |
20 from ._config import ( |
23 from ._version_info import VersionInfo |
21 get_run_validators, |
|
22 set_run_validators, |
|
23 ) |
|
24 from . import exceptions |
|
25 from . import filters |
|
26 from . import converters |
|
27 from . import validators |
|
28 |
24 |
29 |
25 |
30 __version__ = "17.2.0" |
26 __version__ = "22.1.0" |
|
27 __version_info__ = VersionInfo._from_version_string(__version__) |
31 |
28 |
32 __title__ = "attrs" |
29 __title__ = "attrs" |
33 __description__ = "Classes Without Boilerplate" |
30 __description__ = "Classes Without Boilerplate" |
34 __uri__ = "http://www.attrs.org/" |
31 __url__ = "https://www.attrs.org/" |
|
32 __uri__ = __url__ |
35 __doc__ = __description__ + " <" + __uri__ + ">" |
33 __doc__ = __description__ + " <" + __uri__ + ">" |
36 |
34 |
37 __author__ = "Hynek Schlawack" |
35 __author__ = "Hynek Schlawack" |
38 __email__ = "hs@ox.cx" |
36 __email__ = "hs@ox.cx" |
39 |
37 |
40 __license__ = "MIT" |
38 __license__ = "MIT" |
41 __copyright__ = "Copyright (c) 2015 Hynek Schlawack" |
39 __copyright__ = "Copyright (c) 2015 Hynek Schlawack" |
42 |
40 |
43 |
41 |
44 s = attrs = attributes |
42 s = attributes = attrs |
45 ib = attrib = attr |
43 ib = attr = attrib |
|
44 dataclass = partial(attrs, auto_attribs=True) # happy Easter ;) |
46 |
45 |
47 __all__ = [ |
46 __all__ = [ |
48 "Attribute", |
47 "Attribute", |
49 "Factory", |
48 "Factory", |
50 "NOTHING", |
49 "NOTHING", |