Skip to content

Commit 38adb0a

Browse files
committed
[validation] Avoid using 'type' as method arg
1 parent b2d3900 commit 38adb0a

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

odml/validation.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ class ValidationError(object):
88
"""
99
Represents an error found in the validation process
1010
11-
The error is bound to an odML-object (*obj*) or a list of those
12-
and contains a message and a type which may be one of:
11+
The error is bound to an odML-object (*obj*) or a list of
12+
those and contains a message and a rank which may be one of:
1313
'error', 'warning', 'info'
1414
"""
1515

16-
def __init__(self, obj, msg, type='error'):
16+
def __init__(self, obj, msg, rank='error'):
1717
self.obj = obj
1818
self.msg = msg
19-
self.type = type
19+
self.type = rank
2020

2121
@property
2222
def is_warning(self):
@@ -31,9 +31,9 @@ def path(self):
3131
return self.obj.get_path()
3232

3333
def __repr__(self):
34-
return "<ValidationError(%s):%s \"%s\">" % (self.type,
35-
self.obj,
36-
self.msg)
34+
return "<ValidationError(%s):%s '%s'>" % (self.type,
35+
self.obj,
36+
self.msg)
3737

3838

3939
class Validation(object):

0 commit comments

Comments
 (0)