Skip to content

Commit

Permalink
Merge pull request #546 from python-rope/unused-vars
Browse files Browse the repository at this point in the history
Remove unused vars
  • Loading branch information
lieryan committed Nov 27, 2022
2 parents 5939ed6 + a8b91cd commit b991a15
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions ropetest/refactor/patchedasttest.py
Expand Up @@ -105,7 +105,6 @@ def test_integer_literals_and_sorted_children(self):
source = "a = 10\n"
ast_frag = patchedast.get_patched_ast(source, True)
checker = _ResultChecker(self, ast_frag)
# start = source.index('10')
checker.check_children("Num", ["10"])

def test_ellipsis(self):
Expand All @@ -127,7 +126,6 @@ def test_assign_node(self):
source = "a = 10\n"
ast_frag = patchedast.get_patched_ast(source, True)
checker = _ResultChecker(self, ast_frag)
start = source.index("a") # noqa
checker.check_region("Assign", 0, len(source) - 1)
checker.check_children("Assign", ["Name", " ", "=", " ", "Num"])

Expand All @@ -136,7 +134,6 @@ def test_ann_assign_node_without_target(self):
source = "a: List[int]\n"
ast_frag = patchedast.get_patched_ast(source, True)
checker = _ResultChecker(self, ast_frag)
start = source.index("a") # noqa
checker.check_region("AnnAssign", 0, len(source) - 1)
checker.check_children("AnnAssign", ["Name", "", ":", " ", "Subscript"])

Expand All @@ -145,7 +142,6 @@ def test_ann_assign_node_with_target(self):
source = "a: int = 10\n"
ast_frag = patchedast.get_patched_ast(source, True)
checker = _ResultChecker(self, ast_frag)
start = source.index("a") # noqa
checker.check_region("AnnAssign", 0, len(source) - 1)
checker.check_children(
"AnnAssign", ["Name", "", ":", " ", "Name", " ", "=", " ", "Num"]
Expand Down Expand Up @@ -375,9 +371,10 @@ def test_aug_assign_node(self):
source = "a += 1\n"
ast_frag = patchedast.get_patched_ast(source, True)
checker = _ResultChecker(self, ast_frag)
start = source.index("a") # noqa
start = source.index("a")
checker.check_region("AugAssign", 0, len(source) - 1)
checker.check_children("AugAssign", ["Name", " ", "+", "", "=", " ", "Num"])
self.assertTrue(start is not None)

@testutils.only_for_versions_lower("3")
def test_back_quotenode(self):
Expand Down

0 comments on commit b991a15

Please sign in to comment.