mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-09-03 00:25:08 +00:00
[cleanup] Add more ruff rules (#10149)
Authored by: seproDev Reviewed-by: bashonly <88596187+bashonly@users.noreply.github.com> Reviewed-by: Simon Sawicki <contact@grub4k.xyz>
This commit is contained in:
@ -65,7 +65,7 @@ class PostProcessor(metaclass=PostProcessorMetaClass):
|
||||
|
||||
def to_screen(self, text, prefix=True, *args, **kwargs):
|
||||
if self._downloader:
|
||||
tag = '[%s] ' % self.PP_NAME if prefix else ''
|
||||
tag = f'[{self.PP_NAME}] ' if prefix else ''
|
||||
return self._downloader.to_screen(f'{tag}{text}', *args, **kwargs)
|
||||
|
||||
def report_warning(self, text, *args, **kwargs):
|
||||
@ -127,7 +127,7 @@ class PostProcessor(metaclass=PostProcessorMetaClass):
|
||||
if allowed[format_type]:
|
||||
return func(self, info)
|
||||
else:
|
||||
self.to_screen('Skipping %s' % format_type)
|
||||
self.to_screen(f'Skipping {format_type}')
|
||||
return [], info
|
||||
return wrapper
|
||||
return decorator
|
||||
@ -174,7 +174,7 @@ class PostProcessor(metaclass=PostProcessorMetaClass):
|
||||
self._progress_hooks.append(ph)
|
||||
|
||||
def report_progress(self, s):
|
||||
s['_default_template'] = '%(postprocessor)s %(status)s' % s
|
||||
s['_default_template'] = '%(postprocessor)s %(status)s' % s # noqa: UP031
|
||||
if not self._downloader:
|
||||
return
|
||||
|
||||
|
Reference in New Issue
Block a user