Closed yousefmoazzam closed 3 months ago
If a function parameter has no default value, then Parameter.default is equal to Parameter.empty https://docs.python.org/3/library/inspect.html#inspect.Parameter.default.
Parameter.default
Parameter.empty
This can be used in place of the slightly awkward stringifying of a value of type Parameter and then checking for the presence of the "=" character: https://github.com/DiamondLightSource/httomo/blob/d9afc1f04e29a375cee17d33033d75f47a99da34/templates/yaml_templates_generator.py#L107
Parameter
"="
If a function parameter has no default value, then
Parameter.default
is equal toParameter.empty
https://docs.python.org/3/library/inspect.html#inspect.Parameter.default.This can be used in place of the slightly awkward stringifying of a value of type
Parameter
and then checking for the presence of the"="
character: https://github.com/DiamondLightSource/httomo/blob/d9afc1f04e29a375cee17d33033d75f47a99da34/templates/yaml_templates_generator.py#L107