Skip to content

Commit

Permalink
Mark two occurance of unicode as Python 2 only with NOQA: F821 as lin…
Browse files Browse the repository at this point in the history
…ter on Python 3 as check will fail.
  • Loading branch information
loechel committed Sep 18, 2017
1 parent 5b93d16 commit 30accb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RestrictedPython/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _compile_restricted_mode(
c_ast = None
allowed_source_types = [str, ast.Module]
if IS_PY2:
allowed_source_types.append(unicode)
allowed_source_types.append(unicode) # NOQA: F821,E501 # PY2 only statement, in Python 2 only module
if not issubclass(type(source), tuple(allowed_source_types)):
raise TypeError('Not allowed source type: '
'"{0.__class__.__name__}".'.format(source))
Expand Down

0 comments on commit 30accb3

Please sign in to comment.