WIP: Expand the developer documentation #27
2 changed files with 18 additions and 7 deletions
|
|
@ -37,6 +37,7 @@ from .object_model import (
|
|||
)
|
||||
from ..i18n import _
|
||||
from ..error import DictConsistencyError
|
||||
from ..tiramisu import CONVERT_OPTION
|
||||
|
||||
|
||||
class CollectFamily:
|
||||
|
|
@ -197,7 +198,14 @@ class CollectVariable:
|
|||
)
|
||||
new_params = []
|
||||
namespace = self.objectspace.namespace
|
||||
params_data = list(CONVERT_OPTION.get(self.user_type, {}).get("params", {}))
|
||||
for key, val in params.items():
|
||||
if params_data and key not in params_data:
|
||||
raise DictConsistencyError(
|
||||
_('params "{0}" is not a known parameters with type "{1}" for "{2}" (the list of possible parameters is {3})').format(key, self.user_type, self.path, display_list(params_data, add_quote=True)),
|
||||
92,
|
||||
self.sources,
|
||||
)
|
||||
try:
|
||||
new_params.append(
|
||||
AnyParam(
|
||||
|
|
|
|||
|
|
@ -64,15 +64,18 @@ class Walker:
|
|||
main_structures: Optional[List[str]] = None,
|
||||
isolated_namespace: bool = True,
|
||||
) -> None:
|
||||
directory_dict = chain(
|
||||
(
|
||||
if not main_namespace:
|
||||
directory_dict = extra_structures.items()
|
||||
else:
|
||||
directory_dict = chain(
|
||||
(
|
||||
main_namespace,
|
||||
main_structures,
|
||||
(
|
||||
main_namespace,
|
||||
main_structures,
|
||||
),
|
||||
),
|
||||
),
|
||||
extra_structures.items(),
|
||||
)
|
||||
extra_structures.items(),
|
||||
)
|
||||
for namespace, directories in directory_dict:
|
||||
self.convert.create_namespace(namespace, isolated_namespace)
|
||||
for filename in self.get_sorted_filenames(directories):
|
||||
|
|
|
|||
Loading…
Reference in a new issue