Skip to content

Commit

Permalink
pre-commit fixups
Browse files Browse the repository at this point in the history
  • Loading branch information
yarikoptic committed Aug 21, 2024
1 parent 9adbdb1 commit 15047f1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,3 @@ keys (all optional):
- Proposed by: mih (6), jwodder (4), TheChymera (1), mslw (1), jsheunis (1)
- Merged by: mih (6), yarikoptic (4), bpoldrack (1), christian-monch (1), jsheunis (1)
- PR duration quantiles (days): [0.0, 0.0, 5.0]

8 changes: 5 additions & 3 deletions src/solidation/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,8 +271,10 @@ def to_markdown(self) -> str:
if untriaged_issues:
s += f"##### Untriaged issues of the last {dayscovered} days\n"
for i in sorted(untriaged_issues, key=lambda x: x.created_at):
s += f"- [{sanitize_md(i.title)}]({i.html_url}) " + \
f"[{i.repository.full_name}]\n"
s += (
f"- [{sanitize_md(i.title)}]({i.html_url}) "
+ f"[{i.repository.full_name}]\n"
)

s += (
f"##### Max {self.config.num_oldest_prs} oldest, open, non-draft"
Expand Down Expand Up @@ -440,7 +442,7 @@ def ensure_aware(dt: datetime) -> datetime:

def sanitize_md(s: str) -> str:
# Remove `[]` symbols to ensure correct markdown in the references
return re.sub(r'([\\\[\]])', r'\\\1', s)
return re.sub(r"([\\\[\]])", r"\\\1", s)


@click.command()
Expand Down
5 changes: 3 additions & 2 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@


def test_sanitize_md() -> None:
assert sanitize_md(r"[gh-actions](deps): Fix \n") \
== r"\[gh-actions\](deps): Fix \\n"
assert (
sanitize_md(r"[gh-actions](deps): Fix \n") == r"\[gh-actions\](deps): Fix \\n"
)

0 comments on commit 15047f1

Please sign in to comment.