fix: python 3.13 support

This commit is contained in:
egarette@silique.fr 2026-06-16 21:19:47 +02:00
parent 80ba78a9ef
commit fecf0d1039
10 changed files with 68 additions and 1 deletions

View file

@ -434,7 +434,7 @@ class Collect(CollectType, CollectFamily, CollectVariable):
subpath: Optional[str],
parameters: dict,
comment: Optional[str],
parent_option: Optional[Collect],
parent_option: Optional["Collect"],
*,
raises: bool=True,
test_exists: bool=True,

View file

@ -181,3 +181,11 @@ def test_type_family_redefine_type():
def test_type_family_redefine_type_namespace():
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)

View 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])

View file

@ -0,0 +1,3 @@
{
"my_family.my_variable": false
}

View file

@ -0,0 +1,3 @@
{
"my_family.my_variable": false
}

View 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])

View file

@ -0,0 +1,3 @@
{
"ns2.my_family.my_variable": false
}

View file

@ -0,0 +1,3 @@
{
"ns2.my_family.my_variable": false
}

View file

@ -0,0 +1,9 @@
%YAML 1.2
---
version: 1.1
my_family:
type: my_family_type
my_variable: false
...

View file

@ -0,0 +1,9 @@
%YAML 1.2
---
version: 1.1
my_family_type:
description: My family type
my_variable: true # my variable
...