Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/attr/__init__.py: 100%

27 statements  

« prev     ^ index     » next       coverage.py v7.0.1, created at 2022-12-25 06:11 +0000

1# SPDX-License-Identifier: MIT 

2 

3import sys 

4import warnings 

5 

6from functools import partial 

7 

8from . import converters, exceptions, filters, setters, validators 

9from ._cmp import cmp_using 

10from ._config import get_run_validators, set_run_validators 

11from ._funcs import asdict, assoc, astuple, evolve, has, resolve_types 

12from ._make import ( 

13 NOTHING, 

14 Attribute, 

15 Factory, 

16 attrib, 

17 attrs, 

18 fields, 

19 fields_dict, 

20 make_class, 

21 validate, 

22) 

23from ._next_gen import define, field, frozen, mutable 

24from ._version_info import VersionInfo 

25 

26 

27if sys.version_info < (3, 7): # pragma: no cover 

28 warnings.warn( 

29 "Running attrs on Python 3.6 is deprecated & we intend to drop " 

30 "support soon. If that's a problem for you, please let us know why & " 

31 "we MAY re-evaluate: <https://github.com/python-attrs/attrs/pull/993>", 

32 DeprecationWarning, 

33 ) 

34 

35__version__ = "22.2.0" 

36__version_info__ = VersionInfo._from_version_string(__version__) 

37 

38__title__ = "attrs" 

39__description__ = "Classes Without Boilerplate" 

40__url__ = "https://www.attrs.org/" 

41__uri__ = __url__ 

42__doc__ = __description__ + " <" + __uri__ + ">" 

43 

44__author__ = "Hynek Schlawack" 

45__email__ = "hs@ox.cx" 

46 

47__license__ = "MIT" 

48__copyright__ = "Copyright (c) 2015 Hynek Schlawack" 

49 

50 

51s = attributes = attrs 

52ib = attr = attrib 

53dataclass = partial(attrs, auto_attribs=True) # happy Easter ;) 

54 

55 

56class AttrsInstance: 

57 pass 

58 

59 

60__all__ = [ 

61 "Attribute", 

62 "AttrsInstance", 

63 "Factory", 

64 "NOTHING", 

65 "asdict", 

66 "assoc", 

67 "astuple", 

68 "attr", 

69 "attrib", 

70 "attributes", 

71 "attrs", 

72 "cmp_using", 

73 "converters", 

74 "define", 

75 "evolve", 

76 "exceptions", 

77 "field", 

78 "fields", 

79 "fields_dict", 

80 "filters", 

81 "frozen", 

82 "get_run_validators", 

83 "has", 

84 "ib", 

85 "make_class", 

86 "mutable", 

87 "resolve_types", 

88 "s", 

89 "set_run_validators", 

90 "setters", 

91 "validate", 

92 "validators", 

93]