Skip to content

Commit

Permalink
Merge branch 'master' into clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Howitz committed Feb 9, 2019
2 parents 9d99e9c + 1a51621 commit 9bdc17a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/RestrictedPython/transformer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1139,7 +1139,7 @@ def visit_Print(self, node):
self.print_info.print_used = True
self.warn(node,
"Print statement is deprecated and "
"not avaliable anymore in Python 3.")
"not available anymore in Python 3.")

node = self.node_contents_visit(node)
if node.dest is None:
Expand Down Expand Up @@ -1326,7 +1326,7 @@ def visit_Lambda(self, node):
node = self.node_contents_visit(node)

if IS_PY3:
# Implicit Tuple unpacking is not anymore avaliable in Python3
# Implicit Tuple unpacking is not anymore available in Python3
return node

# Check for tuple parameters which need _getiter_ protection
Expand Down
2 changes: 1 addition & 1 deletion tests/test_compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ def test_compile_restricted():
assert len(record) == 2
assert record[0].message.args[0] == \
'Line 3: Print statement is deprecated ' \
'and not avaliable anymore in Python 3.'
'and not available anymore in Python 3.'
assert record[1].message.args[0] == \
"Line 2: Prints, but never reads 'printed' variable."

Expand Down
8 changes: 4 additions & 4 deletions tests/test_print_stmt.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def test_print_stmt__with_printed_no_print_nested(c_exec):
assert code is not None
assert errors == ()
assert warnings == [
"Line 2: Print statement is deprecated and not avaliable anymore in Python 3.", # NOQA: E501
"Line 2: Print statement is deprecated and not available anymore in Python 3.", # NOQA: E501
"Line 3: Doesn't print, but reads 'printed' variable."
]

Expand All @@ -192,7 +192,7 @@ def test_print_stmt__with_print_no_printed(c_exec):
assert code is not None
assert errors == ()
assert warnings == [
"Line 3: Print statement is deprecated and not avaliable anymore in Python 3.", # NOQA: E501
"Line 3: Print statement is deprecated and not available anymore in Python 3.", # NOQA: E501
"Line 2: Prints, but never reads 'printed' variable."
]

Expand All @@ -212,8 +212,8 @@ def test_print_stmt__with_print_no_printed_nested(c_exec):
assert code is not None
assert errors == ()
assert warnings == [
"Line 2: Print statement is deprecated and not avaliable anymore in Python 3.", # NOQA: E501
"Line 4: Print statement is deprecated and not avaliable anymore in Python 3.", # NOQA: E501
"Line 2: Print statement is deprecated and not available anymore in Python 3.", # NOQA: E501
"Line 4: Print statement is deprecated and not available anymore in Python 3.", # NOQA: E501
"Line 3: Prints, but never reads 'printed' variable.",
]

Expand Down

0 comments on commit 9bdc17a

Please sign in to comment.