feat: add default inference behavior for basic types #13
Loading…
Reference in a new issue
No description provided.
Delete branch "basic_types_inference"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
feature only available for the basic types, that is for these types:
{str: "string", int: "number", bool: "boolean", float: "float"}@ -65,0 +66,4 @@types = {str: "string", int: "number", bool: "boolean", float: "float"}# variable's type inference with a default value with a basic typeif multi is False and variable.type == "string" and type(variable.default) != str:This line is not correct to me.
Example:
is an invalid dictionary.
@ -65,0 +68,4 @@# - version: 1.0, the default value is of type "string" by defaultif variable.type is None:variable.type = "string"elif variable.version == "1.1":Not only 1.1, should be "else:"
@ -65,0 +75,4 @@variable.type = basic_types[type(variable.default)]else:# XXX FIXME strange. weird. not goodvariable.type = "string"If variable.type is "number" it will override by "string".
Multi value should be supported too (raise if type are different in this case).
WIP: feat: add default inference behavior for basic typesto feat: add default inference behavior for basic typesPull request closed