Skip to content

Commit

Permalink
Merge branch 'master' into ekr-walk3
Browse files Browse the repository at this point in the history
  • Loading branch information
lieryan committed Nov 27, 2022
2 parents 9b4f82e + f47a05e commit 2e4d9b7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bin/tag-release.py
Expand Up @@ -16,7 +16,7 @@ def get_changelog(version):
search_heading = f"# Release {version}"
curdate = datetime.today().date().isoformat()

headings = re.findall("# Release \d+\.\d+\.\d+", s)
headings = re.findall(r"# Release \d+\.\d+\.\d+", s)
version_heading_index = headings.index(search_heading)
version_changelog = s[
s.index(headings[version_heading_index]) : s.index(
Expand All @@ -32,7 +32,7 @@ def get_changelog(version):

def remove_headings(version_changelog):
# Remove Markdown-style headings as it matches Git comment syntax
version_changelog = re.sub("^#+\s+", "", version_changelog, flags=re.MULTILINE)
version_changelog = re.sub(r"^#+\s+", "", version_changelog, flags=re.MULTILINE)
return version_changelog


Expand Down
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 2e4d9b7

Please sign in to comment.