Skip to content

Commit d142a75

Browse files
edtf.utils: clean lint
1 parent 94ec9c2 commit d142a75

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

edtf/util.py

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
from logging import warning
99
from traceback import extract_stack
1010

11+
1112
def remapparams(**remap):
1213
'''
1314
Remap the specified named parameters.
@@ -65,7 +66,7 @@ def remapparams_wrapper(*a, **kw):
6566
def parser(s, parse_all=True):
6667
pass
6768

68-
assert parser.__name__ == 'parser'
69+
assert parser.__name__ == 'parser' # noqa: S101
6970
parser('foo')
7071
# this should not warn
7172
parser('foo', parse_all=False)
@@ -77,7 +78,9 @@ def parser(s, parse_all=True):
7778
except ValueError:
7879
pass
7980
else:
80-
assert False, "expected ValueError because of duplicated parameters"
81+
raise AssertionError(
82+
"expected ValueError because of duplicated parameters"
83+
)
8184

8285
try:
8386
@remapparams()
@@ -86,12 +89,16 @@ def no_remappings():
8689
except ValueError:
8790
pass
8891
else:
89-
assert False, "expected ValueError from @remapparams() because no remappings"
92+
raise AssertionError(
93+
"expected ValueError from @remapparams() because no remappings"
94+
)
9095
try:
9196
@remapparams(p1='p2', p2='p3')
9297
def no_remappings():
9398
pass
9499
except ValueError:
95100
pass
96101
else:
97-
assert False, "expected ValueError from @remapparams() because p1 remaps to another remapped parameter"
102+
raise AssertionError(
103+
"expected ValueError from @remapparams() because p1 remaps to another remapped parameter"
104+
)

0 commit comments

Comments
 (0)