gemseo.core.grammars.simpler_grammar module#

A simple grammar that does not check the data types.

class 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.