Coverage for yamlable/__init__.py: 100%

12 statements  

« prev     ^ index     » next       coverage.py v6.4.1, created at 2022-07-06 08:57 +0000

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

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

3# 

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

5 

6from yamlable.base import AbstractYamlObject, NONE_IGNORE_CHECKS, read_yaml_node_as_dict 

7from yamlable.main import YamlCodec, register_yamlable_codec, yaml_info_decorate, yaml_info, YamlAble, \ 

8 AbstractYamlAble, YAMLABLE_PREFIX 

9from yamlable.yaml_objects import YamlObject2, ABCYAMLMeta, YAMLObjectMetaclassStrict 

10 

11try: 

12 # -- Distribution mode -- 

13 # import from _version.py generated by setuptools_scm during release 

14 from ._version import version as __version__ 

15except ImportError: 

16 # -- Source mode -- 

17 # use setuptools_scm to get the current version from src using git 

18 from setuptools_scm import get_version as _gv 

19 from os import path as _path 

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

21 

22__all__ = [ 

23 '__version__', 

24 # submodules 

25 'base', 'main', 'yaml_objects', 

26 # symbols 

27 'AbstractYamlObject', 'NONE_IGNORE_CHECKS', 'read_yaml_node_as_dict', 

28 'YamlCodec', 'register_yamlable_codec', 'yaml_info_decorate', 'yaml_info', 'YamlAble', 'AbstractYamlAble', 

29 'YAMLABLE_PREFIX', 

30 'YamlObject2', 'ABCYAMLMeta', 'YAMLObjectMetaclassStrict' 

31] 

32 

33try: # python 3.5+ 

34 from yamlable.base import Y # noqa: F401 

35 __all__.append('Y') 

36except ImportError: 

37 pass 

38 

39try: # python 3.5+ 

40 from yamlable.main import YA # noqa: F401 

41 __all__.append('YA') 

42except ImportError: 

43 pass