I suspect (and this is a wild guess) Pylint is complaining because json.loads
could return a bool, if asked to decode a string like "false"
. And the resulting bool would in fact not have a method named iteritems
.
But then neither would a string or a list or a number, so I don't know why it's picking on bool. Maybe because it comes first alphabetically among all the possible types.
Does an explicit isinstance(my_params, dict)
check make it happy?