simpler_grammar module¶
A simple grammar that does not check the data types.
- class gemseo.core.grammars.simpler_grammar.SimplerGrammar(name, names_to_types=None, required_names=None, **kwargs)[source]
Bases:
SimpleGrammar
A simple grammar that does not check the data types.
Initialize self. See help(type(self)) for accurate signature.
- Parameters:
name (str) – The name of the grammar.
names_to_types (SimpleGrammarTypes | None) – The mapping defining the data names as keys, and data types as values. If
None
, the grammar is empty.required_names (Iterable[str] | None) – The names of the required elements. If
None
, all the elements are required.**kwargs (Any) – These arguments are not used.
- Raises:
ValueError – If the name is empty.
- from_namespaced: NamespacesMapping
The mapping from element names with namespace prefix to element names without namespace prefix.
- name: str
The name of the grammar.
- to_namespaced: NamespacesMapping
The mapping from element names without namespace prefix to element names with namespace prefix.