str-to-obj 2024.4__tar.gz → 2024.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. {str_to_obj-2024.4 → str_to_obj-2024.6}/MANIFEST.in +1 -0
  2. {str_to_obj-2024.4 → str_to_obj-2024.6}/PKG-INFO +28 -19
  3. str_to_obj-2024.6/README-COPYRIGHT-utf8.txt +44 -0
  4. {str_to_obj-2024.4 → str_to_obj-2024.6}/README.rst +25 -16
  5. {str_to_obj-2024.4 → str_to_obj-2024.6}/documentation/wiki/description.asciidoc +48 -16
  6. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/__init__.py +0 -4
  7. str_to_obj-2024.6/package/str_to_obj/api/catalog.py +58 -0
  8. str_to_obj-2024.6/package/str_to_obj/api/type.py +58 -0
  9. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/catalog/boolean.py +1 -1
  10. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/catalog/collection.py +1 -3
  11. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/interface/console.py +0 -1
  12. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/main.py +2 -2
  13. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/task/casting.py +12 -14
  14. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/task/comparison.py +3 -3
  15. str_to_obj-2024.6/package/str_to_obj/type/annotation.py +103 -0
  16. str_to_obj-2024.6/package/str_to_obj/type/hint.py +78 -0
  17. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/type/hint_tree.py +60 -41
  18. str_to_obj-2024.6/package/str_to_obj/type/type.py +121 -0
  19. str_to_obj-2024.6/package/str_to_obj/type/value.py +69 -0
  20. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/version.py +1 -1
  21. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj.egg-info/PKG-INFO +28 -19
  22. str_to_obj-2024.6/package/str_to_obj.egg-info/SOURCES.txt +35 -0
  23. {str_to_obj-2024.4 → str_to_obj-2024.6}/pyproject.toml +0 -1
  24. str_to_obj-2024.6/requirements.txt +2 -0
  25. {str_to_obj-2024.4 → str_to_obj-2024.6}/setup.py +40 -80
  26. str_to_obj-2024.4/README-COPYRIGHT-utf8.txt +0 -16
  27. str_to_obj-2024.4/str_to_obj/type/annotation.py +0 -81
  28. str_to_obj-2024.4/str_to_obj/type/hint.py +0 -57
  29. str_to_obj-2024.4/str_to_obj/type/type.py +0 -97
  30. str_to_obj-2024.4/str_to_obj/type/value.py +0 -47
  31. str_to_obj-2024.4/str_to_obj.egg-info/SOURCES.txt +0 -32
  32. {str_to_obj-2024.4 → str_to_obj-2024.6}/README-LICENCE-utf8.txt +0 -0
  33. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/catalog/callable.py +0 -0
  34. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/catalog/choices.py +0 -0
  35. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/catalog/number.py +0 -0
  36. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/catalog/path.py +0 -0
  37. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/runtime/type.py +0 -0
  38. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/runtime/value.py +0 -0
  39. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj/task/inspection.py +0 -0
  40. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj.egg-info/dependency_links.txt +0 -0
  41. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj.egg-info/requires.txt +0 -0
  42. {str_to_obj-2024.4 → str_to_obj-2024.6/package}/str_to_obj.egg-info/top_level.txt +0 -0
  43. {str_to_obj-2024.4 → str_to_obj-2024.6}/setup.cfg +0 -0
@@ -1,3 +1,4 @@
1
1
  include README-COPYRIGHT-utf8.txt
2
2
  include README-LICENCE-utf8.txt
3
+ include requirements.txt
3
4
  include documentation/wiki/description.asciidoc
@@ -1,18 +1,18 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: str-to-obj
3
- Version: 2024.4
3
+ Version: 2024.6
4
4
  Summary: Convert strings to Python objects guided by (potentially annotated) type hints
5
5
  Home-page: https://src.koda.cnrs.fr/eric.debreuve/str-to-obj/
6
6
  Author: Eric Debreuve
7
7
  Author-email: eric.debreuve@cnrs.fr
8
8
  License: CeCILL-2.1
9
- Project-URL: Documentation, https://src.koda.cnrs.fr/eric.debreuve/str-to-obj//-/wikis/home
9
+ Project-URL: Documentation, https://src.koda.cnrs.fr/eric.debreuve/str-to-obj/-/wikis/home
10
10
  Project-URL: Source, https://src.koda.cnrs.fr/eric.debreuve/str-to-obj/
11
11
  Keywords: str,character string,Python object,conversion,type hint,type annotation
12
12
  Classifier: Topic :: Software Development
13
13
  Classifier: Intended Audience :: Developers
14
14
  Classifier: License :: OSI Approved :: CEA CNRS Inria Logiciel Libre License, version 2.1 (CeCILL-2.1)
15
- Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3
16
16
  Classifier: Development Status :: 4 - Beta
17
17
  Requires-Python: >=3.11
18
18
  Description-Content-Type: text/x-rst
@@ -34,6 +34,9 @@ Requires-Dist: rich
34
34
  .. |DOCUMENTATION_URL| replace:: https://src.koda.cnrs.fr/eric.debreuve/str-to-obj/-/wikis/home
35
35
  .. _DOCUMENTATION_URL: https://src.koda.cnrs.fr/eric.debreuve/str-to-obj/-/wikis/home
36
36
 
37
+ .. |DEPENDENCIES_MANDATORY| replace:: logger_36, rich
38
+ .. |DEPENDENCIES_OPTIONAL| replace:: None
39
+
37
40
 
38
41
 
39
42
  ===================================
@@ -42,6 +45,13 @@ Requires-Dist: rich
42
45
 
43
46
 
44
47
 
48
+ Documentation
49
+ =============
50
+
51
+ The documentation is available at |DOCUMENTATION_URL|_.
52
+
53
+
54
+
45
55
  Installation
46
56
  ============
47
57
 
@@ -51,14 +61,6 @@ at: |PYPI_PROJECT_URL|_.
51
61
  It should be installable from Python distribution platforms or Integrated Development Environments (IDEs).
52
62
  Otherwise, it can be installed from a command console using `pip <https://pip.pypa.io/>`_:
53
63
 
54
- ..
55
- - For all users, after acquiring administrative rights:
56
- - First installation: ``pip install`` |PYPI_NAME_LITERAL|
57
- - Installation update: ``pip install --upgrade`` |PYPI_NAME_LITERAL|
58
- - For the current user (no administrative rights required):
59
- - First installation: ``pip install --user`` |PYPI_NAME_LITERAL|
60
- - Installation update: ``pip install --user --upgrade`` |PYPI_NAME_LITERAL|
61
-
62
64
  +--------------+-------------------------------------------------------+----------------------------------------------------------+
63
65
  | | For all users (after acquiring administrative rights) | For the current user (no administrative rights required) |
64
66
  +==============+=======================================================+==========================================================+
@@ -69,27 +71,34 @@ Otherwise, it can be installed from a command console using `pip <https://pip.py
69
71
 
70
72
 
71
73
 
72
- Documentation
73
- =============
74
+ Dependencies
75
+ ============
74
76
 
75
- The documentation is available at |DOCUMENTATION_URL|_.
77
+ The development relies on several packages:
78
+
79
+ - Mandatory: |DEPENDENCIES_MANDATORY|
80
+ - Optional: |DEPENDENCIES_OPTIONAL|
81
+
82
+ The mandatory dependencies, if any, are installed automatically by `pip <https://pip.pypa.io/>`_, if they are not already, as part of the installation of |PROJECT_NAME|.
83
+ Python distribution platforms or Integrated Development Environments (IDEs) should also take care of this.
84
+ The optional dependencies, if any, must be installed independently by following the related instructions, for added functionalities of |PROJECT_NAME|.
76
85
 
77
86
 
78
87
 
79
88
  Acknowledgments
80
89
  ===============
81
90
 
82
- The project is developed with `PyCharm Community <https://www.jetbrains.com/pycharm/>`_.
91
+ .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
92
+ :target: https://github.com/psf/black
93
+ .. image:: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336
94
+ :target: https://pycqa.github.io/isort/
83
95
 
84
- The development relies on several open-source packages
85
- (see ``install_requires`` in ``setup.py``, if present; otherwise ``import`` statements should be searched for).
96
+ The project is developed with `PyCharm Community <https://www.jetbrains.com/pycharm/>`_.
86
97
 
87
98
  The code is formatted by `Black <https://github.com/psf/black/>`_, *The Uncompromising Code Formatter*.
88
99
 
89
100
  The imports are ordered by `isort <https://github.com/timothycrosley/isort/>`_... *your imports, so you don't have to*.
90
101
 
91
-
92
-
93
102
  ..
94
103
  COPYRIGHT NOTICE
95
104
 
@@ -0,0 +1,44 @@
1
+ Copyright CNRS/Inria/UniCA
2
+ Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
3
+
4
+ This software is governed by the CeCILL license under French law and
5
+ abiding by the rules of distribution of free software. You can use,
6
+ modify and/ or redistribute the software under the terms of the CeCILL
7
+ license as circulated by CEA, CNRS and INRIA at the following URL
8
+ "http://www.cecill.info".
9
+
10
+ As a counterpart to the access to the source code and rights to copy,
11
+ modify and redistribute granted by the license, users are provided only
12
+ with a limited warranty and the software's author, the holder of the
13
+ economic rights, and the successive licensors have only limited
14
+ liability.
15
+
16
+ In this respect, the user's attention is drawn to the risks associated
17
+ with loading, using, modifying and/or developing or reproducing the
18
+ software by the user in light of its specific status of free software,
19
+ that may mean that it is complicated to manipulate, and that also
20
+ therefore means that it is reserved for developers and experienced
21
+ professionals having in-depth computer knowledge. Users are therefore
22
+ encouraged to load and test the software's suitability as regards their
23
+ requirements in conditions enabling the security of their systems and/or
24
+ data to be ensured and, more generally, to use and operate it in the
25
+ same conditions as regards security.
26
+
27
+ The fact that you are presently reading this means that you have had
28
+ knowledge of the CeCILL license and that you accept its terms.
29
+
30
+ SEE LICENCE NOTICE: README-LICENCE-utf8.txt
31
+
32
+ This software is being developed by Eric Debreuve, a CNRS employee and
33
+ member of team Morpheme.
34
+ Team Morpheme is a joint team between Inria, CNRS, and UniCA.
35
+ It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
36
+ I3S, and Laboratory iBV.
37
+
38
+ CNRS: https://www.cnrs.fr/index.php/en
39
+ Inria: https://www.inria.fr/en/
40
+ UniCA: https://univ-cotedazur.eu/
41
+ Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
42
+ I3S: https://www.i3s.unice.fr/en/
43
+ iBV: http://ibv.unice.fr/
44
+ Team Morpheme: https://team.inria.fr/morpheme/
@@ -13,6 +13,9 @@
13
13
  .. |DOCUMENTATION_URL| replace:: https://src.koda.cnrs.fr/eric.debreuve/str-to-obj/-/wikis/home
14
14
  .. _DOCUMENTATION_URL: https://src.koda.cnrs.fr/eric.debreuve/str-to-obj/-/wikis/home
15
15
 
16
+ .. |DEPENDENCIES_MANDATORY| replace:: logger_36, rich
17
+ .. |DEPENDENCIES_OPTIONAL| replace:: None
18
+
16
19
 
17
20
 
18
21
  ===================================
@@ -21,6 +24,13 @@
21
24
 
22
25
 
23
26
 
27
+ Documentation
28
+ =============
29
+
30
+ The documentation is available at |DOCUMENTATION_URL|_.
31
+
32
+
33
+
24
34
  Installation
25
35
  ============
26
36
 
@@ -30,14 +40,6 @@ at: |PYPI_PROJECT_URL|_.
30
40
  It should be installable from Python distribution platforms or Integrated Development Environments (IDEs).
31
41
  Otherwise, it can be installed from a command console using `pip <https://pip.pypa.io/>`_:
32
42
 
33
- ..
34
- - For all users, after acquiring administrative rights:
35
- - First installation: ``pip install`` |PYPI_NAME_LITERAL|
36
- - Installation update: ``pip install --upgrade`` |PYPI_NAME_LITERAL|
37
- - For the current user (no administrative rights required):
38
- - First installation: ``pip install --user`` |PYPI_NAME_LITERAL|
39
- - Installation update: ``pip install --user --upgrade`` |PYPI_NAME_LITERAL|
40
-
41
43
  +--------------+-------------------------------------------------------+----------------------------------------------------------+
42
44
  | | For all users (after acquiring administrative rights) | For the current user (no administrative rights required) |
43
45
  +==============+=======================================================+==========================================================+
@@ -48,27 +50,34 @@ Otherwise, it can be installed from a command console using `pip <https://pip.py
48
50
 
49
51
 
50
52
 
51
- Documentation
52
- =============
53
+ Dependencies
54
+ ============
53
55
 
54
- The documentation is available at |DOCUMENTATION_URL|_.
56
+ The development relies on several packages:
57
+
58
+ - Mandatory: |DEPENDENCIES_MANDATORY|
59
+ - Optional: |DEPENDENCIES_OPTIONAL|
60
+
61
+ The mandatory dependencies, if any, are installed automatically by `pip <https://pip.pypa.io/>`_, if they are not already, as part of the installation of |PROJECT_NAME|.
62
+ Python distribution platforms or Integrated Development Environments (IDEs) should also take care of this.
63
+ The optional dependencies, if any, must be installed independently by following the related instructions, for added functionalities of |PROJECT_NAME|.
55
64
 
56
65
 
57
66
 
58
67
  Acknowledgments
59
68
  ===============
60
69
 
61
- The project is developed with `PyCharm Community <https://www.jetbrains.com/pycharm/>`_.
70
+ .. image:: https://img.shields.io/badge/code%20style-black-000000.svg
71
+ :target: https://github.com/psf/black
72
+ .. image:: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336
73
+ :target: https://pycqa.github.io/isort/
62
74
 
63
- The development relies on several open-source packages
64
- (see ``install_requires`` in ``setup.py``, if present; otherwise ``import`` statements should be searched for).
75
+ The project is developed with `PyCharm Community <https://www.jetbrains.com/pycharm/>`_.
65
76
 
66
77
  The code is formatted by `Black <https://github.com/psf/black/>`_, *The Uncompromising Code Formatter*.
67
78
 
68
79
  The imports are ordered by `isort <https://github.com/timothycrosley/isort/>`_... *your imports, so you don't have to*.
69
80
 
70
-
71
-
72
81
  ..
73
82
  COPYRIGHT NOTICE
74
83
 
@@ -1,7 +1,35 @@
1
- // Copyright CNRS/Inria/UCA
2
- // Contributor(s): Eric Debreuve (since 2023)
3
- //
4
- // eric.debreuve@cnrs.fr
1
+ // Copyright CNRS/Inria/UniCA
2
+ // Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
3
+ // SEE COPYRIGHT NOTICE BELOW
4
+
5
+ :AUTHOR: Eric Debreuve
6
+ :EMAIL: eric.debreuve@cnrs.fr
7
+
8
+ :PROJECT_NAME: Str-to-Obj
9
+ :SHORT_DESCRIPTION: Convert strings to Python objects guided by (potentially annotated) type hints
10
+ :KEYWORDS: str, character string, Python object, conversion, type hint, type annotation
11
+
12
+ :REPOSITORY_NAME: str-to-obj
13
+ :REPOSITORY_USER: eric.debreuve
14
+ :REPOSITORY_SITE: src.koda.cnrs.fr
15
+ :DOCUMENTATION_SITE: -/wikis/home
16
+ :SINCE_YEAR: 2023
17
+
18
+ :LICENSE_SHORT: CeCILL-2.1
19
+ :LICENCE_LONG: CEA CNRS Inria Logiciel Libre License, version 2.1
20
+ :PY_VERSION_MAJOR: 3
21
+ :PY_VERSION_MIN: 3.11
22
+
23
+ :PYPI_NAME: str-to-obj
24
+ :PYPI_TOPIC: Software Development
25
+ :PYPI_AUDIENCE: Developers
26
+ :PYPI_STATUS: 4 - Beta
27
+
28
+ :IMPORT_NAME: str_to_obj
29
+
30
+ :DEPENDENCIES_OPTIONAL: None
31
+
32
+ // COPYRIGHT NOTICE
5
33
  //
6
34
  // This software is governed by the CeCILL license under French law and
7
35
  // abiding by the rules of distribution of free software. You can use,
@@ -28,15 +56,19 @@
28
56
  //
29
57
  // The fact that you are presently reading this means that you have had
30
58
  // knowledge of the CeCILL license and that you accept its terms.
31
-
32
- :AUTHOR: Eric Debreuve
33
- :EMAIL: eric.debreuve@cnrs.fr
34
-
35
- :PROJECT_NAME: Str-to-Obj
36
- :SHORT_DESCRIPTION: Convert strings to Python objects guided by (potentially annotated) type hints
37
- :KEYWORDS: str, character string, Python object, conversion, type hint, type annotation
38
-
39
- :REPOSITORY_NAME: str-to-obj
40
- :REPOSITORY_USER: eric.debreuve
41
- :REPOSITORY_SITE: src.koda.cnrs.fr
42
- :SINCE_YEAR: 2023
59
+ //
60
+ // SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
61
+ //
62
+ // This software is being developed by Eric Debreuve, a CNRS employee and
63
+ // member of team Morpheme.
64
+ // Team Morpheme is a joint team between Inria, CNRS, and UniCA.
65
+ // It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
66
+ // I3S, and Laboratory iBV.
67
+ //
68
+ // CNRS: https://www.cnrs.fr/index.php/en
69
+ // Inria: https://www.inria.fr/en/
70
+ // UniCA: https://univ-cotedazur.eu/
71
+ // Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
72
+ // I3S: https://www.i3s.unice.fr/en/
73
+ // iBV: http://ibv.unice.fr/
74
+ // Team Morpheme: https://team.inria.fr/morpheme/
@@ -6,12 +6,8 @@ SEE COPYRIGHT NOTICE BELOW
6
6
 
7
7
  from str_to_obj.main import ObjectFromStr
8
8
  from str_to_obj.runtime.value import INVALID_VALUE
9
- from str_to_obj.task.casting import CastValue
10
- from str_to_obj.type.annotation import annotation_t
11
- from str_to_obj.type.type import type_t
12
9
  from str_to_obj.version import __version__
13
10
 
14
-
15
11
  """
16
12
  COPYRIGHT NOTICE
17
13
 
@@ -0,0 +1,58 @@
1
+ """
2
+ Copyright CNRS/Inria/UniCA
3
+ Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
4
+ SEE COPYRIGHT NOTICE BELOW
5
+ """
6
+
7
+ from str_to_obj.catalog.boolean import boolean_mode_e, boolean_t
8
+ from str_to_obj.catalog.callable import callable_t
9
+ from str_to_obj.catalog.choices import choices_t
10
+ from str_to_obj.catalog.collection import collection_t
11
+ from str_to_obj.catalog.number import number_t
12
+ from str_to_obj.catalog.path import path_purpose_e, path_t, path_type_e
13
+
14
+ """
15
+ COPYRIGHT NOTICE
16
+
17
+ This software is governed by the CeCILL license under French law and
18
+ abiding by the rules of distribution of free software. You can use,
19
+ modify and/ or redistribute the software under the terms of the CeCILL
20
+ license as circulated by CEA, CNRS and INRIA at the following URL
21
+ "http://www.cecill.info".
22
+
23
+ As a counterpart to the access to the source code and rights to copy,
24
+ modify and redistribute granted by the license, users are provided only
25
+ with a limited warranty and the software's author, the holder of the
26
+ economic rights, and the successive licensors have only limited
27
+ liability.
28
+
29
+ In this respect, the user's attention is drawn to the risks associated
30
+ with loading, using, modifying and/or developing or reproducing the
31
+ software by the user in light of its specific status of free software,
32
+ that may mean that it is complicated to manipulate, and that also
33
+ therefore means that it is reserved for developers and experienced
34
+ professionals having in-depth computer knowledge. Users are therefore
35
+ encouraged to load and test the software's suitability as regards their
36
+ requirements in conditions enabling the security of their systems and/or
37
+ data to be ensured and, more generally, to use and operate it in the
38
+ same conditions as regards security.
39
+
40
+ The fact that you are presently reading this means that you have had
41
+ knowledge of the CeCILL license and that you accept its terms.
42
+
43
+ SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
44
+
45
+ This software is being developed by Eric Debreuve, a CNRS employee and
46
+ member of team Morpheme.
47
+ Team Morpheme is a joint team between Inria, CNRS, and UniCA.
48
+ It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
49
+ I3S, and Laboratory iBV.
50
+
51
+ CNRS: https://www.cnrs.fr/index.php/en
52
+ Inria: https://www.inria.fr/en/
53
+ UniCA: https://univ-cotedazur.eu/
54
+ Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
55
+ I3S: https://www.i3s.unice.fr/en/
56
+ iBV: http://ibv.unice.fr/
57
+ Team Morpheme: https://team.inria.fr/morpheme/
58
+ """
@@ -0,0 +1,58 @@
1
+ """
2
+ Copyright CNRS/Inria/UniCA
3
+ Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
4
+ SEE COPYRIGHT NOTICE BELOW
5
+ """
6
+
7
+ from str_to_obj.runtime.type import ANY_TYPE
8
+ from str_to_obj.task.casting import CastValue
9
+ from str_to_obj.task.comparison import TypesAreCompatible
10
+ from str_to_obj.type.annotation import annotation_t
11
+ from str_to_obj.type.hint_tree import hint_t
12
+ from str_to_obj.type.type import type_t
13
+
14
+ """
15
+ COPYRIGHT NOTICE
16
+
17
+ This software is governed by the CeCILL license under French law and
18
+ abiding by the rules of distribution of free software. You can use,
19
+ modify and/ or redistribute the software under the terms of the CeCILL
20
+ license as circulated by CEA, CNRS and INRIA at the following URL
21
+ "http://www.cecill.info".
22
+
23
+ As a counterpart to the access to the source code and rights to copy,
24
+ modify and redistribute granted by the license, users are provided only
25
+ with a limited warranty and the software's author, the holder of the
26
+ economic rights, and the successive licensors have only limited
27
+ liability.
28
+
29
+ In this respect, the user's attention is drawn to the risks associated
30
+ with loading, using, modifying and/or developing or reproducing the
31
+ software by the user in light of its specific status of free software,
32
+ that may mean that it is complicated to manipulate, and that also
33
+ therefore means that it is reserved for developers and experienced
34
+ professionals having in-depth computer knowledge. Users are therefore
35
+ encouraged to load and test the software's suitability as regards their
36
+ requirements in conditions enabling the security of their systems and/or
37
+ data to be ensured and, more generally, to use and operate it in the
38
+ same conditions as regards security.
39
+
40
+ The fact that you are presently reading this means that you have had
41
+ knowledge of the CeCILL license and that you accept its terms.
42
+
43
+ SEE LICENCE NOTICE: file README-LICENCE-utf8.txt at project source root.
44
+
45
+ This software is being developed by Eric Debreuve, a CNRS employee and
46
+ member of team Morpheme.
47
+ Team Morpheme is a joint team between Inria, CNRS, and UniCA.
48
+ It is hosted by the Centre Inria d'Université Côte d'Azur, Laboratory
49
+ I3S, and Laboratory iBV.
50
+
51
+ CNRS: https://www.cnrs.fr/index.php/en
52
+ Inria: https://www.inria.fr/en/
53
+ UniCA: https://univ-cotedazur.eu/
54
+ Centre Inria d'Université Côte d'Azur: https://www.inria.fr/en/centre/sophia/
55
+ I3S: https://www.i3s.unice.fr/en/
56
+ iBV: http://ibv.unice.fr/
57
+ Team Morpheme: https://team.inria.fr/morpheme/
58
+ """
@@ -8,7 +8,7 @@ import dataclasses as d
8
8
  import typing as h
9
9
  from enum import Enum as enum_t
10
10
 
11
- from logger_36 import FormattedMessage
11
+ from logger_36.format import FormattedMessage
12
12
  from str_to_obj.type.annotation import annotation_t
13
13
  from str_to_obj.type.hint import annotated_hint_t
14
14
 
@@ -4,8 +4,6 @@ Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
4
4
  SEE COPYRIGHT NOTICE BELOW
5
5
  """
6
6
 
7
- from __future__ import annotations
8
-
9
7
  import dataclasses as d
10
8
  import types as t
11
9
  import typing as h
@@ -72,7 +70,7 @@ class collection_t(annotation_t):
72
70
  cls,
73
71
  stripe: any_hint_h | tuple[any_hint_h, ...] | type_t | tuple[type_t, ...],
74
72
  /,
75
- ) -> collection_t:
73
+ ) -> h.Self:
76
74
  """"""
77
75
  if not isinstance(stripe, (type_t | tuple[type_t, ...])):
78
76
  stripe = type_t.NewForHint(stripe)
@@ -4,7 +4,6 @@ Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
4
4
  SEE COPYRIGHT NOTICE BELOW
5
5
  """
6
6
 
7
-
8
7
  import typing as h
9
8
 
10
9
 
@@ -9,14 +9,14 @@ import types as t
9
9
  import typing as h
10
10
 
11
11
  from str_to_obj.task.casting import CastValue
12
- from str_to_obj.type.hint_tree import any_hint_h, hint_tree_t
12
+ from str_to_obj.type.hint_tree import any_hint_h, hint_t
13
13
 
14
14
 
15
15
  def ObjectFromStr(
16
16
  string: str,
17
17
  /,
18
18
  *,
19
- expected_type: any_hint_h | hint_tree_t | type[t.NoneType] = None,
19
+ expected_type: any_hint_h | hint_t | type[t.NoneType] = None,
20
20
  ) -> tuple[h.Any, list[str]]:
21
21
  """
22
22
  expected_type: Must not be passed explicitly as None since None is interpreted as
@@ -4,15 +4,13 @@ Contributor(s): Eric Debreuve (eric.debreuve@cnrs.fr) since 2023
4
4
  SEE COPYRIGHT NOTICE BELOW
5
5
  """
6
6
 
7
- from __future__ import annotations
8
-
9
- import dataclasses as dtcl
7
+ import dataclasses as d
10
8
  import types as t
11
9
  import typing as h
12
10
  from pathlib import Path as path_t
13
11
 
14
12
  from str_to_obj.type.hint import any_hint_h, simple_hint_h
15
- from str_to_obj.type.hint_tree import hint_tree_t
13
+ from str_to_obj.type.hint_tree import hint_t
16
14
 
17
15
 
18
16
  class _not_a_leaf_node_t:
@@ -22,7 +20,7 @@ class _not_a_leaf_node_t:
22
20
  _NOT_A_LEAF_NODE = _not_a_leaf_node_t()
23
21
 
24
22
 
25
- @dtcl.dataclass(slots=True, repr=False, eq=False)
23
+ @d.dataclass(slots=True, repr=False, eq=False)
26
24
  class _value_node_t:
27
25
  """
28
26
  Leave elements to the tree.
@@ -33,12 +31,12 @@ class _value_node_t:
33
31
  leaf_value: h.Any | None = _NOT_A_LEAF_NODE
34
32
 
35
33
 
36
- @dtcl.dataclass(slots=True, repr=False, eq=False)
34
+ @d.dataclass(slots=True, repr=False, eq=False)
37
35
  class _value_tree_t(_value_node_t):
38
- elements: tuple[_value_tree_t, ...] = None
36
+ elements: tuple[h.Self, ...] = None
39
37
 
40
38
  @classmethod
41
- def NewFromValue(cls, value: h.Any, /) -> _value_tree_t:
39
+ def NewFromValue(cls, value: h.Any, /) -> h.Self:
42
40
  """"""
43
41
  if isinstance(value, h.Iterable) and not isinstance(value, str):
44
42
  elements = tuple(cls.NewFromValue(_elm) for _elm in value)
@@ -54,7 +52,7 @@ class _value_tree_t(_value_node_t):
54
52
  return self.leaf_value
55
53
 
56
54
  def CastValue(
57
- self, hint_tree: hint_tree_t, /, *, only_check_validity: bool = False
55
+ self, hint_tree: hint_t, /, *, only_check_validity: bool = False
58
56
  ) -> tuple[h.Any, list[str]] | list[str]:
59
57
  """"""
60
58
  issues = self._CastToHint(hint_tree)
@@ -69,7 +67,7 @@ class _value_tree_t(_value_node_t):
69
67
  else:
70
68
  return self._RebuiltValue(), []
71
69
 
72
- def _CastToHint(self, hint_node: hint_tree_t, /) -> list[str]:
70
+ def _CastToHint(self, hint_node: hint_t, /) -> list[str]:
73
71
  """
74
72
  Returned value=the value tree has been successfully cast to the hint tree
75
73
  specification, or not.
@@ -183,7 +181,7 @@ class _value_tree_t(_value_node_t):
183
181
  f"Expected=Value following template {hint_node.template_as_str}."
184
182
  ]
185
183
 
186
- def _CompliesWithAnnotations(self, hint_node: hint_tree_t, /) -> list[str]:
184
+ def _CompliesWithAnnotations(self, hint_node: hint_t, /) -> list[str]:
187
185
  """"""
188
186
  output = []
189
187
 
@@ -195,15 +193,15 @@ class _value_tree_t(_value_node_t):
195
193
 
196
194
  def CastValue(
197
195
  value: h.Any,
198
- hint: any_hint_h | hint_tree_t,
196
+ hint: any_hint_h | hint_t,
199
197
  /,
200
198
  *,
201
199
  only_check_validity: bool = False,
202
200
  ) -> tuple[h.Any, list[str]] | list[str]:
203
201
  """"""
204
202
  value_tree = _value_tree_t.NewFromValue(value)
205
- if not isinstance(hint, hint_tree_t):
206
- hint = hint_tree_t.NewForHint(hint)
203
+ if not isinstance(hint, hint_t):
204
+ hint = hint_t.NewForHint(hint)
207
205
 
208
206
  return value_tree.CastValue(hint, only_check_validity=only_check_validity)
209
207
 
@@ -7,12 +7,12 @@ SEE COPYRIGHT NOTICE BELOW
7
7
  import types as t
8
8
  import typing as h
9
9
 
10
- from str_to_obj.type.hint_tree import hint_tree_t
10
+ from str_to_obj.type.hint_tree import hint_t
11
11
 
12
12
 
13
13
  def TypesAreCompatible(
14
- one: hint_tree_t,
15
- another: hint_tree_t,
14
+ one: hint_t,
15
+ another: hint_t,
16
16
  /,
17
17
  *,
18
18
  strict_mode: bool = True,