feat: we should be able to customize a new variable type

This commit is contained in:
egarette@silique.fr 2024-01-20 23:00:59 +01:00
parent 4660a65303
commit 4770eb0d0e
271 changed files with 534 additions and 433 deletions

View file

@ -139,3 +139,54 @@ Let's execute `script.py`:
{'rougail.my_variable': 'my_value', 'rougail.my_variable_jinja': 'no', 'example.my_variable_extra': 'my_value_extra'} {'rougail.my_variable': 'my_value', 'rougail.my_variable_jinja': 'no', 'example.my_variable_extra': 'my_value_extra'}
The value of the `my_variable_extra` variable is calculated, and it's value comes from the :func:`return_no` function. The value of the `my_variable_extra` variable is calculated, and it's value comes from the :func:`return_no` function.
Create your own type
----------------------
A variable has a type. This type enables the variable to define the values that are accepted by this variable.
There is a series of default types, but obviously not all cases are taken.
It's possible to create your own type.
Here an example to a lipogram option (in a string, we cannot use "e" character):
.. code-block:: python
:caption: the `lipogram.py` file content
from tiramisu import StrOption
class LipogramOption(StrOption):
__slots__ = tuple()
_type = 'lipogram'
def validate(self,
value):
super().validate(value)
# verify that there is any 'e' in the sentense
if 'e' in value:
raise ValueError('Perec wrote a book without any "e", you could not do it in a simple sentence?')
To add the new lipogram type in Rougail:
.. code-block:: python
>>> from rougail import Rougail, RougailConfig
>>> RougailConfig['dictionaries_dir'] = ['dict']
>>> RougailConfig['custom_types']['lipogram'] = LipogramOption
Now, we can use lipogram type.
Here is a :file:`dict/00-base.yml` dictionary:
.. code-block:: yaml
---
version: '1.0'
var:
type: lipogram
.. code-block:: python
>>> rougail = Rougail()
>>> config = rougail.get_config()
>>> config.option('var').value.set('blah')
>>> config.option('var').value.set('I just want to add a quality string that has no bad characters')
[...]
tiramisu.error.ValueOptionError: "I just want to add a quality string that has no bad characters" is an invalid lipogram for "var", Perec wrote a book without any "e", you could not do it in a simple sentence?

View file

@ -28,10 +28,12 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
""" """
from tiramisu import Config from tiramisu import Config
from copy import copy
from .convert import RougailConvert from .convert import RougailConvert
from .config import RougailConfig from .config import RougailConfig
from .update import RougailUpgrade from .update import RougailUpgrade
from .object_model import CONVERT_OPTION
def tiramisu_display_name(kls) -> str: def tiramisu_display_name(kls) -> str:
@ -46,7 +48,7 @@ class Rougail:
def __init__( def __init__(
self, self,
rougailconfig = None, rougailconfig=None,
) -> None: ) -> None:
if rougailconfig is None: if rougailconfig is None:
rougailconfig = RougailConfig rougailconfig = RougailConfig
@ -66,7 +68,8 @@ class Rougail:
if not self.config: if not self.config:
tiram_obj = self.converted.save(self.rougailconfig["tiramisu_cache"]) tiram_obj = self.converted.save(self.rougailconfig["tiramisu_cache"])
optiondescription = {} optiondescription = {}
exec(tiram_obj, None, optiondescription) # pylint: disable=W0122 custom_types = {custom.__name__: custom for custom in self.rougailconfig["custom_types"].values()}
exec(tiram_obj, custom_types, optiondescription) # pylint: disable=W0122
self.config = Config( self.config = Config(
optiondescription["option_0"], optiondescription["option_0"],
display_name=tiramisu_display_name, display_name=tiramisu_display_name,
@ -75,4 +78,4 @@ class Rougail:
return self.config return self.config
__ALL__ = ("Rougail", "RougailConvert", "RougailConfig", "RougailUpgrade") __ALL__ = ("Rougail", "RougailConfig", "RougailUpgrade")

View file

@ -27,27 +27,12 @@ You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
""" """
from .variable import CONVERT_OPTION
import importlib.resources import importlib.resources
from os.path import isfile from os.path import isfile
from ..utils import load_modules from ..utils import load_modules
ANNOTATORS = None ANNOTATORS = None
#
#
# if not 'files' in dir(importlib.resources):
# # old python version
# class fake_files:
# def __init__(self, package):
# self.mod = []
# dir_package = dirname(importlib.resources._get_package(package).__file__)
# for mod in importlib.resources.contents(package):
# self.mod.append(join(dir_package, mod))
#
# def iterdir(self):
# return self.mod
# importlib.resources.files = fake_files
def get_level(module): def get_level(module):
@ -101,4 +86,4 @@ class SpaceAnnotator: # pylint: disable=R0903
annotator(objectspace) annotator(objectspace)
__all__ = ("SpaceAnnotator", "CONVERT_OPTION") __all__ = ("SpaceAnnotator",)

View file

@ -33,58 +33,6 @@ from rougail.error import DictConsistencyError
from rougail.object_model import Calculation from rougail.object_model import Calculation
def convert_boolean(value: str) -> bool:
"""Boolean coercion. The Rougail XML may contain srings like `True` or `False`"""
if isinstance(value, bool):
return value
value = value.lower()
if value == "true":
return True
elif value == "false":
return False
raise Exception(f"unknown boolean value {value}")
CONVERT_OPTION = {
"string": dict(opttype="StrOption"),
"number": dict(opttype="IntOption", func=int),
"float": dict(opttype="FloatOption", func=float),
"boolean": dict(opttype="BoolOption", func=convert_boolean),
"secret": dict(opttype="PasswordOption"),
"mail": dict(opttype="EmailOption"),
"unix_filename": dict(opttype="FilenameOption"),
"date": dict(opttype="DateOption"),
"unix_user": dict(opttype="UsernameOption"),
"ip": dict(opttype="IPOption", initkwargs={"allow_reserved": True}),
"cidr": dict(opttype="IPOption", initkwargs={"cidr": True}),
"netmask": dict(opttype="NetmaskOption"),
"network": dict(opttype="NetworkOption"),
"network_cidr": dict(opttype="NetworkOption", initkwargs={"cidr": True}),
"broadcast": dict(opttype="BroadcastOption"),
"netbios": dict(
opttype="DomainnameOption",
initkwargs={"type": "netbios", "warnings_only": True},
),
"domainname": dict(
opttype="DomainnameOption", initkwargs={"type": "domainname", "allow_ip": False}
),
"hostname": dict(
opttype="DomainnameOption", initkwargs={"type": "hostname", "allow_ip": False}
),
"web_address": dict(
opttype="URLOption", initkwargs={"allow_ip": False, "allow_without_dot": True}
),
"port": dict(opttype="PortOption", initkwargs={"allow_private": True}),
"mac": dict(opttype="MACOption"),
"unix_permissions": dict(
opttype="PermissionsOption", initkwargs={"warnings_only": True}, func=int
),
"choice": dict(opttype="ChoiceOption"),
#
"symlink": dict(opttype="SymLinkOption"),
}
class Walk: class Walk:
"""Walk to objectspace to find variable or family""" """Walk to objectspace to find variable or family"""

View file

@ -77,4 +77,5 @@ RougailConfig = {
"force_convert_dyn_option_description": False, "force_convert_dyn_option_description": False,
"suffix": "", "suffix": "",
"tiramisu_cache": None, "tiramisu_cache": None,
"custom_types": {},
} }

View file

@ -1,4 +1,4 @@
"""Takes a bunch of Rougail XML dispatched in differents folders """Takes a bunch of Rougail YAML dispatched in differents folders
as an input and outputs a Tiramisu's file. as an input and outputs a Tiramisu's file.
Created by: Created by:
@ -27,25 +27,20 @@ GNU General Public License for more details.
You should have received a copy of the GNU General Public License You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Sample usage::
>>> from rougail import RougailConvert
>>> rougail = RougailConvert()
>>> tiramisu = rougail.save('tiramisu.py')
The Rougail
- loads the XML into an internal RougailObjSpace representation
- visits/annotates the objects
- dumps the object space as Tiramisu string
The visit/annotation stage is a complex step that corresponds to the Rougail
procedures.
""" """
import logging import logging
from pathlib import Path from pathlib import Path
from typing import Optional, Union, get_type_hints, Any, Literal, List, Dict, Iterator, Tuple from typing import (
Optional,
Union,
get_type_hints,
Any,
Literal,
List,
Dict,
Iterator,
Tuple,
)
from itertools import chain from itertools import chain
from yaml import safe_load from yaml import safe_load
@ -56,13 +51,15 @@ from .annotator import SpaceAnnotator
from .tiramisureflector import TiramisuReflector from .tiramisureflector import TiramisuReflector
from .utils import get_realpath from .utils import get_realpath
from .object_model import ( from .object_model import (
CONVERT_OPTION,
Family, Family,
Dynamic, Dynamic,
Variable, _Variable,
Choice, Choice,
SymLink, SymLink,
CALCULATION_TYPES, CALCULATION_TYPES,
Calculation, Calculation,
VariableCalculation,
PARAM_TYPES, PARAM_TYPES,
AnyParam, AnyParam,
) )
@ -100,7 +97,7 @@ class Property:
class Paths: class Paths:
def __init__(self) -> None: def __init__(self) -> None:
self._data: Dict[str, Union[Variable, Family]] = {} self._data: Dict[str, Union[_Variable, Family]] = {}
self._dynamics: List[str] = [] self._dynamics: List[str] = []
self.path_prefix = None self.path_prefix = None
@ -149,7 +146,7 @@ class Paths:
def __getitem__( def __getitem__(
self, self,
path: str, path: str,
) -> Union[Family, Variable]: ) -> Union[Family, _Variable]:
if not path in self._data: if not path in self._data:
raise AttributeError(f"cannot find variable or family {path}") raise AttributeError(f"cannot find variable or family {path}")
return self._data[path] return self._data[path]
@ -217,7 +214,6 @@ class ParserVariable:
# #
self.family = Family self.family = Family
self.dynamic = Dynamic self.dynamic = Dynamic
self.variable = Variable
self.choice = Choice self.choice = Choice
# #
self.exclude_imports = [] self.exclude_imports = []
@ -229,13 +225,23 @@ class ParserVariable:
self.is_init = False self.is_init = False
super().__init__() super().__init__()
def get_variable(self):
convert_options = list(CONVERT_OPTION)
convert_options.extend(self.rougailconfig["custom_types"])
class Variable(_Variable):
type: Literal[*convert_options] = convert_options[0]
return Variable
def init(self): def init(self):
if self.is_init: if self.is_init:
return return
self.variable = self.get_variable()
hint = get_type_hints(self.dynamic) hint = get_type_hints(self.dynamic)
self.family_types = hint["type"].__args__ # pylint: disable=W0201 self.family_types = hint["type"].__args__ # pylint: disable=W0201
self.family_attrs = frozenset( # pylint: disable=W0201 self.family_attrs = frozenset( # pylint: disable=W0201
set(hint) | {"redefine"} - {"name", "path", "xmlfiles"} set(hint) - {"name", "path", "xmlfiles"} | {"redefine"}
) )
self.family_calculations = self.search_calculation( # pylint: disable=W0201 self.family_calculations = self.search_calculation( # pylint: disable=W0201
hint hint
@ -246,7 +252,7 @@ class ParserVariable:
# #
hint = get_type_hints(self.choice) hint = get_type_hints(self.choice)
self.choice_attrs = frozenset( # pylint: disable=W0201 self.choice_attrs = frozenset( # pylint: disable=W0201
set(hint) | {"redefine", "exists"} - {"name", "path", "xmlfiles"} set(hint) - {"name", "path", "xmlfiles"} | {"redefine", "exists"}
) )
self.choice_calculations = self.search_calculation( # pylint: disable=W0201 self.choice_calculations = self.search_calculation( # pylint: disable=W0201
hint hint
@ -290,7 +296,7 @@ class ParserVariable:
if isinstance(value, dict) and not self.is_calculation( if isinstance(value, dict) and not self.is_calculation(
key, key,
value, value,
"variable", self.choice_calculations,
False, False,
): ):
break break
@ -356,8 +362,7 @@ class ParserVariable:
family_is_leadership: bool = False, family_is_leadership: bool = False,
family_is_dynamic: bool = False, family_is_dynamic: bool = False,
) -> None: ) -> None:
""" Parse a family """Parse a family"""
"""
if obj is None: if obj is None:
return return
family_obj = {} family_obj = {}
@ -371,10 +376,11 @@ class ParserVariable:
else: else:
subfamily_obj[key] = value subfamily_obj[key] = value
if path in self.paths: if path in self.paths:
# it's just for modify subfamily or subvariable, do not redefine
if family_obj: if family_obj:
if not obj.pop("redefine", False): if not obj.pop("redefine", False):
raise Exception( raise Exception(
"The family {path} already exists and she is not redefined" f"The family {path} already exists and she is not redefined in {filemane}"
) )
self.paths.add( self.paths.add(
path, path,
@ -429,8 +435,7 @@ class ParserVariable:
self, self,
obj: Dict[str, Any], obj: Dict[str, Any],
) -> Iterator[str]: ) -> Iterator[str]:
""" List attributes """List attributes"""
"""
force_to_variable = [] force_to_variable = []
for key, value in obj.items(): for key, value in obj.items():
if key in force_to_variable: if key in force_to_variable:
@ -446,7 +451,7 @@ class ParserVariable:
if isinstance(value, dict) and not self.is_calculation( if isinstance(value, dict) and not self.is_calculation(
key, key,
value, value,
"family", self.family_calculations,
False, False,
): ):
# it's a dict, so a new variables! # it's a dict, so a new variables!
@ -462,8 +467,7 @@ class ParserVariable:
filenames: Union[str, List[str]], filenames: Union[str, List[str]],
family_is_dynamic: bool, family_is_dynamic: bool,
) -> None: ) -> None:
""" Add a new family """Add a new family"""
"""
family["path"] = path family["path"] = path
if not isinstance(filenames, list): if not isinstance(filenames, list):
filenames = [filenames] filenames = [filenames]
@ -483,7 +487,7 @@ class ParserVariable:
if not self.is_calculation( if not self.is_calculation(
key, key,
value, value,
"family", self.family_calculations,
False, False,
): ):
continue continue
@ -528,8 +532,7 @@ class ParserVariable:
family_is_leadership: bool = False, family_is_leadership: bool = False,
family_is_dynamic: bool = False, family_is_dynamic: bool = False,
) -> None: ) -> None:
""" Parse variable """Parse variable"""
"""
if obj is None: if obj is None:
obj = {} obj = {}
extra_attrs = set(obj) - self.choice_attrs extra_attrs = set(obj) - self.choice_attrs
@ -545,7 +548,9 @@ class ParserVariable:
return return
if not obj.pop("redefine", False): if not obj.pop("redefine", False):
raise Exception(f'Variable "{path}" already exists') raise Exception(f'Variable "{path}" already exists')
self.paths.add(path, self.paths[path].model_copy(update=obj), False, force=True) self.paths.add(
path, self.paths[path].model_copy(update=obj), False, force=True
)
self.paths[path].xmlfiles.append(filename) self.paths[path].xmlfiles.append(filename)
else: else:
if "exists" in obj and obj.pop("exists"): if "exists" in obj and obj.pop("exists"):
@ -576,7 +581,7 @@ class ParserVariable:
if self.is_calculation( if self.is_calculation(
key, key,
value, value,
"variable", self.choice_calculations,
False, False,
): ):
try: try:
@ -597,7 +602,7 @@ class ParserVariable:
if not self.is_calculation( if not self.is_calculation(
key, key,
val, val,
"variable", self.choice_calculations,
True, True,
): ):
continue continue
@ -617,8 +622,7 @@ class ParserVariable:
) from err ) from err
def parse_params(self, path, obj): def parse_params(self, path, obj):
""" Parse variable params """Parse variable params"""
"""
if "params" not in obj: if "params" not in obj:
return return
if not isinstance(obj["params"], dict): if not isinstance(obj["params"], dict):
@ -628,7 +632,9 @@ class ParserVariable:
try: try:
params.append(AnyParam(key=key, value=val, type="any")) params.append(AnyParam(key=key, value=val, type="any"))
except ValidationError as err: except ValidationError as err:
raise Exception(f'"{key}" has an invalid "params" for {path}: {err}') from err raise Exception(
f'"{key}" has an invalid "params" for {path}: {err}'
) from err
obj["params"] = params obj["params"] = params
def add_variable( def add_variable(
@ -681,7 +687,7 @@ class ParserVariable:
############################################################################################### ###############################################################################################
def set_name( def set_name(
self, self,
obj: Union[Variable, Family], obj: Union[_Variable, Family],
option_prefix: str, option_prefix: str,
): ):
"""Set Tiramisu object name""" """Set Tiramisu object name"""
@ -697,14 +703,10 @@ class ParserVariable:
self, self,
attribute: str, attribute: str,
value: dict, value: dict,
typ: Literal["variable", "family"], calculations: list,
inside_list: bool, inside_list: bool,
): ):
"""Check if it's a calculation""" """Check if it's a calculation"""
if typ == "variable":
calculations = self.choice_calculations
else:
calculations = self.family_calculations
if inside_list: if inside_list:
calculations = calculations[0] calculations = calculations[0]
else: else:
@ -786,7 +788,9 @@ class RougailConvert(ParserVariable):
inside_list = [] inside_list = []
outside_list = [] outside_list = []
for key, value in hint.items(): for key, value in hint.items():
if "Union" in value.__class__.__name__ and Calculation in value.__args__: if "Union" in value.__class__.__name__ and (
Calculation in value.__args__ or VariableCalculation in value.__args__
):
outside_list.append(key) outside_list.append(key)
if ( if (
"Union" in value.__class__.__name__ "Union" in value.__class__.__name__
@ -914,7 +918,9 @@ class RougailConvert(ParserVariable):
f"pffff version ... {version} not in {self.supported_version}" f"pffff version ... {version} not in {self.supported_version}"
) )
def annotate(self): def annotate(
self,
):
"""Apply annotation""" """Apply annotation"""
if not self.paths.has_value(): if not self.paths.has_value():
self.parse_directories() self.parse_directories()
@ -940,7 +946,7 @@ class RougailConvert(ParserVariable):
def save( def save(
self, self,
filename: None, filename: str,
): ):
"""Return tiramisu object declaration as a string""" """Return tiramisu object declaration as a string"""
self.annotate() self.annotate()
@ -949,5 +955,5 @@ class RougailConvert(ParserVariable):
if filename: if filename:
with open(filename, "w", encoding="utf-8") as tiramisu: with open(filename, "w", encoding="utf-8") as tiramisu:
tiramisu.write(output) tiramisu.write(output)
# print(output) # print(output)
return output return output

View file

@ -21,16 +21,77 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
""" """
from typing import Optional, Union, get_type_hints, Any, Literal, List, Dict, Iterator from typing import Optional, Union, get_type_hints, Any, Literal, List, Dict, Iterator
from pydantic import BaseModel, StrictBool, StrictInt, StrictFloat, StrictStr from pydantic import (
BaseModel,
StrictBool,
StrictInt,
StrictFloat,
StrictStr,
ConfigDict,
)
from .utils import get_jinja_variable_to_param, get_realpath from .utils import get_jinja_variable_to_param, get_realpath
BASETYPE = Union[StrictBool, StrictInt, StrictFloat, StrictStr, None] BASETYPE = Union[StrictBool, StrictInt, StrictFloat, StrictStr, None]
def convert_boolean(value: str) -> bool:
"""Boolean coercion. The Rougail XML may contain srings like `True` or `False`"""
if isinstance(value, bool):
return value
value = value.lower()
if value == "true":
return True
elif value == "false":
return False
raise Exception(f"unknown boolean value {value}")
CONVERT_OPTION = {
"string": dict(opttype="StrOption"),
"number": dict(opttype="IntOption", func=int),
"float": dict(opttype="FloatOption", func=float),
"boolean": dict(opttype="BoolOption", func=convert_boolean),
"secret": dict(opttype="PasswordOption"),
"mail": dict(opttype="EmailOption"),
"unix_filename": dict(opttype="FilenameOption"),
"date": dict(opttype="DateOption"),
"unix_user": dict(opttype="UsernameOption"),
"ip": dict(opttype="IPOption", initkwargs={"allow_reserved": True}),
"cidr": dict(opttype="IPOption", initkwargs={"cidr": True}),
"netmask": dict(opttype="NetmaskOption"),
"network": dict(opttype="NetworkOption"),
"network_cidr": dict(opttype="NetworkOption", initkwargs={"cidr": True}),
"broadcast": dict(opttype="BroadcastOption"),
"netbios": dict(
opttype="DomainnameOption",
initkwargs={"type": "netbios", "warnings_only": True},
),
"domainname": dict(
opttype="DomainnameOption", initkwargs={"type": "domainname", "allow_ip": False}
),
"hostname": dict(
opttype="DomainnameOption", initkwargs={"type": "hostname", "allow_ip": False}
),
"web_address": dict(
opttype="URLOption", initkwargs={"allow_ip": False, "allow_without_dot": True}
),
"port": dict(opttype="PortOption", initkwargs={"allow_private": True}),
"mac": dict(opttype="MACOption"),
"unix_permissions": dict(
opttype="PermissionsOption", initkwargs={"warnings_only": True}, func=int
),
"choice": dict(opttype="ChoiceOption"),
#
"symlink": dict(opttype="SymLinkOption"),
}
class Param(BaseModel): class Param(BaseModel):
key: str key: str
model_config = ConfigDict(extra="forbid")
class AnyParam(Param): class AnyParam(Param):
type: str type: str
@ -70,6 +131,9 @@ PARAM_TYPES = {
class Calculation(BaseModel): class Calculation(BaseModel):
path_prefix: Optional[str] path_prefix: Optional[str]
path: str path: str
inside_list: bool
model_config = ConfigDict(extra="forbid")
def get_realpath( def get_realpath(
self, self,
@ -114,7 +178,6 @@ class JinjaCalculation(Calculation):
jinja: StrictStr jinja: StrictStr
params: Optional[List[Param]] = None params: Optional[List[Param]] = None
return_type: BASETYPE = None return_type: BASETYPE = None
inside_list: bool
def _jinja_to_function( def _jinja_to_function(
self, self,
@ -154,7 +217,7 @@ class JinjaCalculation(Calculation):
objectspace.functions, objectspace.functions,
self.path_prefix, self.path_prefix,
): ):
if isinstance(sub_variable, objectspace.variable): if sub_variable.path in objectspace.variables:
default["params"][true_path] = { default["params"][true_path] = {
"type": "variable", "type": "variable",
"variable": sub_variable, "variable": sub_variable,
@ -223,7 +286,6 @@ class VariableCalculation(Calculation):
] ]
variable: StrictStr variable: StrictStr
propertyerror: bool = True propertyerror: bool = True
inside_list: bool
def to_function( def to_function(
self, self,
@ -251,10 +313,6 @@ class VariableCalculation(Calculation):
if variable.type != "boolean": if variable.type != "boolean":
raise Exception("only boolean!") raise Exception("only boolean!")
params[None].insert(0, self.attribute_name) params[None].insert(0, self.attribute_name)
elif (
self.attribute_name != "default" and variable.path not in objectspace.multis
):
raise Exception("pffff")
if not self.inside_list and self.path in objectspace.multis: if not self.inside_list and self.path in objectspace.multis:
if ( if (
not objectspace.paths.is_dynamic(variable_path) not objectspace.paths.is_dynamic(variable_path)
@ -277,7 +335,6 @@ class InformationCalculation(Calculation):
attribute_name: Literal["default"] attribute_name: Literal["default"]
information: StrictStr information: StrictStr
variable: Optional[StrictStr] variable: Optional[StrictStr]
inside_list: bool
def to_function( def to_function(
self, self,
@ -346,43 +403,15 @@ class Family(BaseModel):
xmlfiles: List[str] = [] xmlfiles: List[str] = []
path: str path: str
class ConfigDict: model_config = ConfigDict(extra="forbid", arbitrary_types_allowed=True)
arbitrary_types_allowed = True
class Dynamic(Family): class Dynamic(Family):
variable: str variable: str
class Variable(BaseModel): class _Variable(BaseModel):
name: str name: str
type: Literal[
"number",
"float",
"string",
"password",
"secret",
"mail",
"boolean",
"unix_filename",
"date",
"unix_user",
"ip",
"local_ip",
"netmask",
"network",
"broadcast",
"netbios",
"domainname",
"hostname",
"web_address",
"port",
"mac",
"cidr",
"network_cidr",
"choice",
"unix_permissions",
] = "string"
description: Optional[str] = None description: Optional[str] = None
default: Union[List[BASETYPE_CALC], BASETYPE_CALC] = None default: Union[List[BASETYPE_CALC], BASETYPE_CALC] = None
params: Optional[List[Param]] = None params: Optional[List[Param]] = None
@ -399,17 +428,19 @@ class Variable(BaseModel):
xmlfiles: List[str] = [] xmlfiles: List[str] = []
path: str path: str
class ConfigDict: model_config = ConfigDict(extra="forbid", arbitrary_types_allowed=True)
arbitrary_types_allowed = True
class Choice(Variable): class Choice(_Variable):
type: Literal["choice"] = "choice"
choices: Union[List[BASETYPE_CALC], Calculation] choices: Union[List[BASETYPE_CALC], Calculation]
class SymLink(BaseModel): class SymLink(BaseModel):
name: str name: str
type: str = "symlink" type: Literal["symlink"] = "symlink"
opt: Variable opt: _Variable
xmlfiles: List[str] = [] xmlfiles: List[str] = []
path: str path: str
model_config = ConfigDict(extra="forbid")

View file

@ -33,10 +33,9 @@ from json import dumps
from os.path import isfile, basename from os.path import isfile, basename
from .i18n import _ from .i18n import _
from .annotator import CONVERT_OPTION
from .error import DictConsistencyError from .error import DictConsistencyError
from .utils import normalize_family from .utils import normalize_family
from .object_model import Calculation from .object_model import Calculation, CONVERT_OPTION
class BaseElt: # pylint: disable=R0903 class BaseElt: # pylint: disable=R0903
@ -122,7 +121,7 @@ class TiramisuReflector:
[ [
"from jinja2 import StrictUndefined, DictLoader", "from jinja2 import StrictUndefined, DictLoader",
"from jinja2.sandbox import SandboxedEnvironment", "from jinja2.sandbox import SandboxedEnvironment",
"from rougail.annotator.variable import CONVERT_OPTION", "from rougail import CONVERT_OPTION",
"from tiramisu.error import ValueWarning", "from tiramisu.error import ValueWarning",
"def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):", "def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):",
" global ENV, CONVERT_OPTION", " global ENV, CONVERT_OPTION",
@ -469,7 +468,10 @@ class Variable(Common):
tiramisu, tiramisu,
): ):
super().__init__(elt, tiramisu) super().__init__(elt, tiramisu)
self.object_type = CONVERT_OPTION[elt.type]["opttype"] if elt.type in self.tiramisu.objectspace.rougailconfig['custom_types']:
self.object_type = self.tiramisu.objectspace.rougailconfig['custom_types'][elt.type].__name__
else:
self.object_type = CONVERT_OPTION[elt.type]["opttype"]
def _populate_attrib( def _populate_attrib(
self, self,
@ -528,7 +530,7 @@ class Variable(Common):
else: else:
validators.append(val) validators.append(val)
keys["validators"] = "[" + ", ".join(validators) + "]" keys["validators"] = "[" + ", ".join(validators) + "]"
for key, value in CONVERT_OPTION[self.elt.type].get("initkwargs", {}).items(): for key, value in CONVERT_OPTION.get(self.elt.type, {}).get("initkwargs", {}).items():
if isinstance(value, str): if isinstance(value, str):
value = f"'{value}'" value = f"'{value}'"
keys[key] = value keys[key] = value

View file

@ -42,7 +42,7 @@ from .error import UpgradeError
from .utils import normalize_family from .utils import normalize_family
from .config import RougailConfig from .config import RougailConfig
from .annotator.variable import CONVERT_OPTION from .object_model import CONVERT_OPTION
VERSIONS = ["0.10", "1.0"] VERSIONS = ["0.10", "1.0"]

View file

@ -0,0 +1,4 @@
---
version: '1.0'
custom:
type: custom

View file

@ -0,0 +1,6 @@
{
"rougail.custom": {
"owner": "default",
"value": null
}
}

View file

@ -0,0 +1,3 @@
{
"rougail.custom": null
}

View file

@ -0,0 +1,6 @@
{
"rougail.custom": {
"owner": "default",
"value": null
}
}

View file

@ -0,0 +1,24 @@
from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_2 = CustomOption(name="custom", doc="custom", properties=frozenset({"basic", "mandatory"}))
optiondescription_1 = OptionDescription(name="rougail", doc="rougail", children=[option_2], properties=frozenset({"basic"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1])

View file

@ -0,0 +1,28 @@
from tiramisu import *
from tiramisu.setting import ALLOWED_LEADER_PROPERTIES
ALLOWED_LEADER_PROPERTIES.add("basic")
ALLOWED_LEADER_PROPERTIES.add("standard")
ALLOWED_LEADER_PROPERTIES.add("advanced")
from importlib.machinery import SourceFileLoader as _SourceFileLoader
from importlib.util import spec_from_loader as _spec_from_loader, module_from_spec as _module_from_spec
global func
func = {'calc_value': calc_value}
def _load_functions(path):
global _SourceFileLoader, _spec_from_loader, _module_from_spec, func
loader = _SourceFileLoader('func', path)
spec = _spec_from_loader(loader.name, loader)
func_ = _module_from_spec(spec)
loader.exec_module(func_)
for function in dir(func_):
if function.startswith('_'):
continue
func[function] = getattr(func_, function)
_load_functions('tests/dictionaries/../eosfunc/test.py')
option_3 = CustomOption(name="custom", doc="custom", properties=frozenset({"basic", "mandatory"}))
optiondescription_2 = OptionDescription(name="rougail", doc="rougail", children=[option_3], properties=frozenset({"basic"}))
optiondescription_1 = OptionDescription(name="1", doc="1", children=[optiondescription_2], properties=frozenset({"basic"}))
option_6 = CustomOption(name="custom", doc="custom", properties=frozenset({"basic", "mandatory"}))
optiondescription_5 = OptionDescription(name="rougail", doc="rougail", children=[option_6], properties=frozenset({"basic"}))
optiondescription_4 = OptionDescription(name="2", doc="2", children=[optiondescription_5], properties=frozenset({"basic"}))
option_0 = OptionDescription(name="baseoption", doc="baseoption", children=[optiondescription_1, optiondescription_4])

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

View file

@ -21,7 +21,7 @@ def _load_functions(path):
_load_functions('tests/dictionaries/../eosfunc/test.py') _load_functions('tests/dictionaries/../eosfunc/test.py')
from jinja2 import StrictUndefined, DictLoader from jinja2 import StrictUndefined, DictLoader
from jinja2.sandbox import SandboxedEnvironment from jinja2.sandbox import SandboxedEnvironment
from rougail.annotator.variable import CONVERT_OPTION from rougail import CONVERT_OPTION
from tiramisu.error import ValueWarning from tiramisu.error import ValueWarning
def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs): def jinja_to_function(__internal_jinja, __internal_type, __internal_multi, **kwargs):
global ENV, CONVERT_OPTION global ENV, CONVERT_OPTION

Some files were not shown because too many files have changed in this diff Show more