File tree Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Expand file tree Collapse file tree 3 files changed +7
-12
lines changed Original file line number Diff line number Diff line change @@ -113,13 +113,11 @@ def _parse_logfiles(logfiles):
113
113
yield from _paths_from_logfile (syspath (normpath (logfile )))
114
114
except ValueError as err :
115
115
raise ui .UserError (
116
- f"malformed logfile { util .displayable_path (logfile )} :"
117
- f" { str (err )} "
116
+ f"malformed logfile { util .displayable_path (logfile )} : { err } "
118
117
) from err
119
118
except OSError as err :
120
119
raise ui .UserError (
121
- f"unreadable logfile { util .displayable_path (logfile )} :"
122
- f" { str (err )} "
120
+ f"unreadable logfile { util .displayable_path (logfile )} : { err } "
123
121
) from err
124
122
125
123
@@ -212,7 +210,7 @@ def get_singleton_disambig_fields(info: hooks.TrackInfo) -> Sequence[str]:
212
210
out = []
213
211
chosen_fields = config ["match" ]["singleton_disambig_fields" ].as_str_seq ()
214
212
calculated_values = {
215
- "index" : f"Index { str ( info .index ) } " ,
213
+ "index" : f"Index { info .index } " ,
216
214
"track_alt" : f"Track { info .track_alt } " ,
217
215
"album" : (
218
216
f"[{ info .album } ]"
Original file line number Diff line number Diff line change @@ -112,7 +112,7 @@ def _reasonstr(self):
112
112
elif hasattr (self .reason , "strerror" ): # i.e., EnvironmentError
113
113
return self .reason .strerror
114
114
else :
115
- return f'"{ str ( self .reason ) } "'
115
+ return f'"{ self .reason } "'
116
116
117
117
def get_message (self ):
118
118
"""Create the human-readable description of the error, sans
Original file line number Diff line number Diff line change @@ -1138,7 +1138,7 @@ def _item_info(self, item):
1138
1138
pass
1139
1139
1140
1140
for tagtype , field in self .tagtype_map .items ():
1141
- info_lines .append (f"{ tagtype } : { str ( getattr (item , field ) )} " )
1141
+ info_lines .append (f"{ tagtype } : { getattr (item , field )} " )
1142
1142
1143
1143
return info_lines
1144
1144
@@ -1297,15 +1297,12 @@ def cmd_status(self, conn):
1297
1297
1298
1298
yield (
1299
1299
f"bitrate: { item .bitrate / 1000 } " ,
1300
- (
1301
- "audio:"
1302
- f" { str (item .samplerate )} :{ str (item .bitdepth )} :{ str (item .channels )} "
1303
- ),
1300
+ f"audio: { item .samplerate } :{ item .bitdepth } :{ item .channels } " ,
1304
1301
)
1305
1302
1306
1303
(pos , total ) = self .player .time ()
1307
1304
yield (
1308
- f"time: { str ( int (pos )) } :{ str ( int (total ) )} " ,
1305
+ f"time: { int (pos )} :{ int (total )} " ,
1309
1306
"elapsed: {pos:.3f}" ,
1310
1307
"duration: {total:.3f}" ,
1311
1308
)
You can’t perform that action at this time.
0 commit comments