- commit
- 989ff204936f2c0fb753657baae272d783a8634a
- parent
- 4a5f6397ae7606fd995298f9ef79732544517d7c
- Author
- Tobias Bengfort <tobias.bengfort@posteo.de>
- Date
- 2024-08-03 07:37
lint: use f-strings
Diffstat
| M | cplay.py | 14 | +++++++------- |
1 files changed, 7 insertions, 7 deletions
diff --git a/cplay.py b/cplay.py
@@ -350,7 +350,7 @@ class List: 350 350 if self.position + i == self.active: 351 351 attr |= curses.A_BOLD 352 352 s_item = self.format_item(item)353 -1 s_item = space_between(' ' + s_item, '', app.cols)-1 353 s_item = space_between(f' {s_item}', '', app.cols) 354 354 yield (s_item, attr) 355 355 for _i in range(max(0, self.rows - len(items))): 356 356 yield '' @@ -408,9 +408,9 @@ class Filelist(List): 408 408 self.set_path(os.getcwd()) 409 409 410 410 def get_title(self):411 -1 title = 'Filelist: %s/' % self.path.rstrip('/')-1 411 title = f'Filelist: {self.path.rstrip("/")}/' 412 412 if self.rsearch_str:413 -1 title += 'search "%s"/' % self.rsearch_str-1 413 title += f'search "{self.rsearch_str}"/' 414 414 return title 415 415 416 416 def format_item(self, item): @@ -516,7 +516,7 @@ class Playlist(List): 516 516 def get_title(self): 517 517 title = 'Playlist' 518 518 if self.path:519 -1 title += ' ' + os.path.basename(self.path)-1 519 title += f' {os.path.basename(self.path)}' 520 520 if self.items != self.items_written: 521 521 title += '*' 522 522 if self.repeat: @@ -642,7 +642,7 @@ class Playlist(List): 642 642 try: 643 643 with open(path, 'w') as fh: 644 644 for item in self.items:645 -1 fh.write('%s\n' % item)-1 645 fh.write(f'{item}\n') 646 646 self.path = path 647 647 self.items_written = self.items.copy() 648 648 except OSError: @@ -728,11 +728,11 @@ class Application: 728 728 yield self.format_progress() 729 729 730 730 if self.input.active:731 -1 status = self.input.prompt + self.input.str + '█'-1 731 status = f'{self.input.prompt}{self.input.str}█' 732 732 elif self.tab == helplist: 733 733 status = __version__ 734 734 elif player.is_playing:735 -1 status = 'Playing %s' % player.get_title()-1 735 status = f'Playing {player.get_title()}' 736 736 else: 737 737 status = '' 738 738