Skip to content

Commit 5927cad

Browse files
committed
Use !r instead of calling repr inside f-string
1 parent 0a2bc44 commit 5927cad

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

beets/util/functemplate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ def __init__(self, ident, args, original):
165165
self.original = original
166166

167167
def __repr__(self):
168-
return f"Call({repr(self.ident)}, {repr(self.args)}, {repr(self.original)})"
168+
return f"Call({self.ident!r}, {self.args!r}, {self.original!r})"
169169

170170
def evaluate(self, env):
171171
"""Evaluate the function call in the environment, returning a

beetsplug/musicbrainz.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,7 @@ def __init__(self, reason, verb, query, tb=None):
6868
super().__init__(reason, verb, tb)
6969

7070
def get_message(self):
71-
return (
72-
f"{self._reasonstr()} in {self.verb} with query {repr(self.query)}"
73-
)
71+
return f"{self._reasonstr()} in {self.verb} with query {self.query!r}"
7472

7573

7674
RELEASE_INCLUDES = list(

beetsplug/replaygain.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ def _find_line(
514514
if output[i].startswith(search):
515515
return i
516516
raise ReplayGainError(
517-
f"ffmpeg output: missing {repr(search)} after line {start_line}"
517+
f"ffmpeg output: missing {search!r} after line {start_line}"
518518
)
519519

520520
def _parse_float(self, line: bytes) -> float:

0 commit comments

Comments
 (0)