Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused vars #546

Merged
merged 2 commits into from Nov 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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