Skip to content

Commit 15e126f

Browse files
committed
Silence eval-used
1 parent cd74ec7 commit 15e126f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

html5lib/inputstream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# surrogates.
3636
assert invalid_unicode_no_surrogate[-1] == "]" and invalid_unicode_no_surrogate.count("]") == 1
3737
invalid_unicode_re = re.compile(invalid_unicode_no_surrogate[:-1] +
38-
eval('"\\uD800-\\uDFFF"') +
38+
eval('"\\uD800-\\uDFFF"') + # pylint:disable=eval-used
3939
"]")
4040
else:
4141
invalid_unicode_re = re.compile(invalid_unicode_no_surrogate)

html5lib/tests/test_stream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ def test_invalid_codepoints(inp, num):
312312
("'\\uDBFF\\uDFFF'", 2),
313313
reason="narrow Python")])
314314
def test_invalid_codepoints_surrogates(inp, num):
315-
inp = eval(inp)
315+
inp = eval(inp) # pylint:disable=eval-used
316316
fp = StringIO(inp)
317317
if ord(max(fp.read())) > 0xFFFF:
318318
pytest.skip("StringIO altered string")

html5lib/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@
2222
# surrogates, and there is no mechanism to further escape such
2323
# escapes.
2424
try:
25-
_x = eval('"\\uD800"')
25+
_x = eval('"\\uD800"') # pylint:disable=eval-used
2626
if not isinstance(_x, text_type):
2727
# We need this with u"" because of http://bugs.jython.org/issue2039
28-
_x = eval('u"\\uD800"')
28+
_x = eval('u"\\uD800"') # pylint:disable=eval-used
2929
assert isinstance(_x, text_type)
3030
except:
3131
supports_lone_surrogates = False

0 commit comments

Comments
 (0)