Coverage for pyfields/__init__.py: 100%

9 statements  

« prev     ^ index     » next       coverage.py v7.2.7, created at 2023-11-06 16:35 +0000

1# Authors: Sylvain MARIE <sylvain.marie@se.com> 

2# + All contributors to <https://github.com/smarie/python-pyfields> 

3# 

4# License: 3-clause BSD, <https://github.com/smarie/python-pyfields/blob/master/LICENSE> 

5from .typing_utils import FieldTypeError 

6from .core import field, Field, FieldError, MandatoryFieldInitError, UnsupportedOnNativeFieldError, \ 

7 ReadOnlyFieldError, NoneError 

8from .validate_n_convert import Converter, ConversionError, DetailedConversionResults, trace_convert 

9from .init_makers import inject_fields, make_init, init_fields 

10from .helpers import copy_value, copy_field, copy_attr, has_fields, get_fields, yield_fields, get_field, \ 

11 get_field_values 

12from .autofields_ import autofields, autoclass 

13 

14try: 

15 # Distribution mode : import from _version.py generated by setuptools_scm during release 

16 from ._version import version as __version__ 

17except ImportError: 

18 # Source mode : use setuptools_scm to get the current version from src using git 

19 from setuptools_scm import get_version as _gv 

20 from os import path as _path 

21 __version__ = _gv(_path.join(_path.dirname(__file__), _path.pardir)) 

22 

23__all__ = [ 

24 '__version__', 

25 # submodules 

26 'core', 'validate_n_convert', 'init_makers', 'helpers', 'autofields_', 

27 # symbols 

28 'field', 'Field', 'FieldError', 'MandatoryFieldInitError', 'UnsupportedOnNativeFieldError', 

29 'ReadOnlyFieldError', 'FieldTypeError', 'NoneError', 

30 'Converter', 'ConversionError', 'DetailedConversionResults', 'trace_convert', 

31 'inject_fields', 'make_init', 'init_fields', 

32 'copy_value', 'copy_field', 'copy_attr', 'has_fields', 'get_fields', 'yield_fields', 'get_field', 

33 'get_field_values', 

34 'autofields', 'autoclass' 

35]