Skip to content

Commit

Permalink
mixed_list: be liberal in what you accept… (closes #110)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhermann committed Jul 27, 2016
1 parent 0680e6d commit 817186f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/configobj/validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -1261,10 +1261,17 @@ def force_list(value, min=None, max=None):


fun_dict = {
int: is_integer,
'int': is_integer,
'integer': is_integer,
float: is_float,
'float': is_float,
'ip_addr': is_ip_addr,
str: is_string,
'str': is_string,
'string': is_string,
bool: is_boolean,
'bool': is_boolean,
'boolean': is_boolean,
}

Expand Down

1 comment on commit 817186f

@EliAndrewC
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 though I'm unsure how the actual types could ever come up. Like, I get the value in allowing both 'bool' and 'boolean', but I'm not sure that we could end up with the actual bool type being passed to the is_mixed_list function that uses fun_dict.

Please sign in to comment.