fix: python 3.13 support
This commit is contained in:
parent
80ba78a9ef
commit
fecf0d1039
10 changed files with 68 additions and 1 deletions
|
|
@ -434,7 +434,7 @@ class Collect(CollectType, CollectFamily, CollectVariable):
|
||||||
subpath: Optional[str],
|
subpath: Optional[str],
|
||||||
parameters: dict,
|
parameters: dict,
|
||||||
comment: Optional[str],
|
comment: Optional[str],
|
||||||
parent_option: Optional[Collect],
|
parent_option: Optional["Collect"],
|
||||||
*,
|
*,
|
||||||
raises: bool=True,
|
raises: bool=True,
|
||||||
test_exists: bool=True,
|
test_exists: bool=True,
|
||||||
|
|
|
||||||
|
|
@ -181,3 +181,11 @@ def test_type_family_redefine_type():
|
||||||
|
|
||||||
def test_type_family_redefine_type_namespace():
|
def test_type_family_redefine_type_namespace():
|
||||||
type_variable("family_redefine_type", namespace=True)
|
type_variable("family_redefine_type", namespace=True)
|
||||||
|
|
||||||
|
|
||||||
|
def test_type_family_param():
|
||||||
|
type_variable("family_param")
|
||||||
|
|
||||||
|
|
||||||
|
def test_type_family_param_namespace():
|
||||||
|
type_variable("family_param", namespace=True)
|
||||||
|
|
|
||||||
14
tests/types/result/family_param/namespace_tiramisu.py
Normal file
14
tests/types/result/family_param/namespace_tiramisu.py
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
from tiramisu import *
|
||||||
|
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
||||||
|
from re import compile as re_compile
|
||||||
|
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
||||||
|
try:
|
||||||
|
groups.namespace
|
||||||
|
except:
|
||||||
|
groups.addgroup('namespace')
|
||||||
|
ALLOWED_LEADER_PROPERTIES.add("basic")
|
||||||
|
ALLOWED_LEADER_PROPERTIES.add("standard")
|
||||||
|
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
||||||
|
option_2 = BoolOption(name="my_variable", doc="my variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_param/00_type.yml', 'tests/types/structures/family_param/00_structure.yml'], 'type': 'boolean'})
|
||||||
|
optiondescription_1 = OptionDescription(name="my_family", doc="My family type", children=[option_2], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_param/00_type.yml', 'tests/types/structures/family_param/00_structure.yml']})
|
||||||
|
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])
|
||||||
3
tests/types/result/family_param/namespace_variables.json
Normal file
3
tests/types/result/family_param/namespace_variables.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"my_family.my_variable": false
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"my_family.my_variable": false
|
||||||
|
}
|
||||||
15
tests/types/result/family_param/tiramisu.py
Normal file
15
tests/types/result/family_param/tiramisu.py
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
from tiramisu import *
|
||||||
|
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
|
||||||
|
from re import compile as re_compile
|
||||||
|
from rougail.tiramisu import func, dict_env, load_functions, ConvertDynOptionDescription
|
||||||
|
try:
|
||||||
|
groups.namespace
|
||||||
|
except:
|
||||||
|
groups.addgroup('namespace')
|
||||||
|
ALLOWED_LEADER_PROPERTIES.add("basic")
|
||||||
|
ALLOWED_LEADER_PROPERTIES.add("standard")
|
||||||
|
ALLOWED_LEADER_PROPERTIES.add("advanced")
|
||||||
|
option_4 = BoolOption(name="my_variable", doc="my variable", default=False, properties=frozenset({"mandatory", "standard"}), informations={'ymlfiles': ['tests/types/types/family_param/00_type.yml', 'tests/types/structures/family_param/00_structure.yml'], 'type': 'boolean'})
|
||||||
|
optiondescription_3 = OptionDescription(name="my_family", doc="My family type", children=[option_4], properties=frozenset({"standard"}), informations={'ymlfiles': ['tests/types/types/family_param/00_type.yml', 'tests/types/structures/family_param/00_structure.yml']})
|
||||||
|
optiondescription_2 = OptionDescription(name="ns2", doc="NS2", group_type=groups.namespace, children=[optiondescription_3], properties=frozenset({"standard"}))
|
||||||
|
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_2])
|
||||||
3
tests/types/result/family_param/variables.json
Normal file
3
tests/types/result/family_param/variables.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"ns2.my_family.my_variable": false
|
||||||
|
}
|
||||||
3
tests/types/result/family_param/variables_rw.json
Normal file
3
tests/types/result/family_param/variables_rw.json
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"ns2.my_family.my_variable": false
|
||||||
|
}
|
||||||
9
tests/types/structures/family_param/00_structure.yml
Normal file
9
tests/types/structures/family_param/00_structure.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
version: 1.1
|
||||||
|
|
||||||
|
my_family:
|
||||||
|
type: my_family_type
|
||||||
|
|
||||||
|
my_variable: false
|
||||||
|
...
|
||||||
9
tests/types/types/family_param/00_type.yml
Normal file
9
tests/types/types/family_param/00_type.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
%YAML 1.2
|
||||||
|
---
|
||||||
|
version: 1.1
|
||||||
|
|
||||||
|
my_family_type:
|
||||||
|
description: My family type
|
||||||
|
|
||||||
|
my_variable: true # my variable
|
||||||
|
...
|
||||||
Loading…
Reference in a new issue