@@ -371,14 +371,18 @@ def capital(self):
371371 )
372372
373373
374- int_re = re .compile ("(int(eger)?)|size|length|max|min" , flags = re .IGNORECASE )
375- str_re = re .compile ("str(ing)?" , flags = re .IGNORECASE )
376- float_re = re .compile ("float|decimal" , flags = re .IGNORECASE )
377- bool_re = re .compile ("bool(ean)?" , flags = re .IGNORECASE )
378- file_re = re .compile ("file|path" , flags = re .IGNORECASE )
379- input_re = re .compile ("input" , flags = re .IGNORECASE )
380- output_re = re .compile ("output" , flags = re .IGNORECASE )
381- dir_re = re .compile ("folder|directory" , flags = re .IGNORECASE )
374+ int_re = re .compile (r"\b((int(eger)?)|size|length|max|min|num(ber)?)\b" , flags = re .IGNORECASE )
375+ str_re = re .compile (r"\bstr(ing)?\b" , flags = re .IGNORECASE )
376+ float_re = re .compile (r"\b(float|decimal)\b" , flags = re .IGNORECASE )
377+ bool_re = re .compile (r"\bbool(ean)?\b" , flags = re .IGNORECASE )
378+ file_re = re .compile (r"\b(file|path)\b" , flags = re .IGNORECASE )
379+ input_re = re .compile (r"input" , flags = re .IGNORECASE )
380+ output_re = re .compile (r"output" , flags = re .IGNORECASE )
381+ dir_re = re .compile (r"\b(folder|directory)\b" , flags = re .IGNORECASE )
382+
383+ default_re = re .compile (r"default(?: value)?(?:[:=] ?| )([^ )\]]+)" , flags = re .IGNORECASE )
384+ float_re = re .compile (r'[+-]?([0-9]+([.][0-9]*)?|[.][0-9]+)' , flags = re .IGNORECASE )
385+ int_re = re .compile (r'[+-]?([0-9]+[^.0-9])' , flags = re .IGNORECASE )
382386
383387
384388def infer_type (string ) -> typing .Optional [cli_types .CliType ]:
0 commit comments