Skip to content

Commit

Permalink
Merge pull request #458 from akaihola/flake8-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
akaihola authored Jan 15, 2023
2 parents 486df53 + 8160d45 commit 3cd28b5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def replace(name: str, regex: Pattern[str], replacement: str, content: str) -> s
if modified_content != content:
return modified_content
raise RuntimeError(
f"The {name} wasn't found in README.rst using the pattern '{regex.pattern}'"
f"The {name} wasn't found in README.rst using the pattern {regex.pattern!r}"
)


Expand Down
2 changes: 1 addition & 1 deletion src/darker/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,7 @@ def main( # pylint: disable=too-many-locals,too-many-branches,too-many-statemen
elif revrange.rev2 != WORKTREE:
raise ArgumentError(
Action(["-r", "--revision"], "revision"),
f"Can't write reformatted files for revision '{revrange.rev2}'."
f"Can't write reformatted files for revision {revrange.rev2!r}."
" Either --diff or --check must be used.",
)

Expand Down
2 changes: 1 addition & 1 deletion src/darker/tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ def test_main_historical_pre_commit(git_repo, monkeypatch):
ArgumentError,
match=(
re.escape(
f"Can't write reformatted files for revision '{older_commit}'."
f"Can't write reformatted files for revision {older_commit!r}."
" Either --diff or --check must be used."
)
),
Expand Down

0 comments on commit 3cd28b5

Please sign in to comment.