Skip to content

Commit

Permalink
lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
giritheja committed Mar 20, 2017
1 parent 1e83b66 commit 96c1a4a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion core/domain/classifier_domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ def validate(self):
if not isinstance(self.exp_version_when_created, int):
raise utils.ValidationError(
'Expected exp_version_when_created to be a int received %d' %
self.exp_version_when_created)
self.exp_version_when_created)

if not isinstance(self.state_name, basestring):
raise utils.ValidationError(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -633,17 +633,17 @@ def validate(self, classifier_data):
]

for float_property in float_properties:
if not float_property in classifier_data.keys():
if float_property not in classifier_data.keys():
raise utils.ValidationError(
'Expected %s to be a key in classifier_data' %
float_property)
if not isinstance(classifier_data[float_property], float):
raise utils.ValidationError(
('Expected %s to be a float, received %f' %
float_property, classifier_data[float_property]))
float_property, classifier_data[float_property]))

for int_property in int_properties:
if not int_property in classifier_data.keys():
if int_property not in classifier_data.keys():
raise utils.ValidationError(
'Expected %s to be a key in classifier_data' %
int_property)
Expand All @@ -653,7 +653,7 @@ def validate(self, classifier_data):
int_property, classifier_data[int_property]))

for dict_property in dict_properties:
if not dict_property in classifier_data.keys():
if dict_property not in classifier_data.keys():
raise utils.ValidationError(
'Expected %s to be a key in classifier_data' %
dict_property)
Expand All @@ -663,10 +663,10 @@ def validate(self, classifier_data):
dict_property, classifier_data[dict_property]))

for list_property in list_properties:
if not list_property in classifier_data.keys():
if list_property not in classifier_data.keys():
raise utils.ValidationError(
'Expected %s to be a key in classifier_data' %
float_property)
list_property)
if not isinstance(classifier_data[list_property], list):
raise utils.ValidationError(
('Expected %s to be a list, received %s' %
Expand Down

0 comments on commit 96c1a4a

Please sign in to comment.