[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:
sepro 2024-06-12 01:09:58 +02:00 committed by GitHub
parent db50f19d76
commit add96eb9f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
915 changed files with 7027 additions and 7246 deletions

View file

@ -80,7 +80,7 @@ class IndavideoEmbedIE(InfoExtractor):
height = int_or_none(self._search_regex(
r'\.(\d{3,4})\.mp4(?:\?|$)', video_url, 'height', default=None))
if not height and len(filesh) == 1:
height = int_or_none(list(filesh.keys())[0])
height = int_or_none(next(iter(filesh.keys())))
token = filesh.get(str(height))
if token is None:
continue
@ -95,7 +95,7 @@ class IndavideoEmbedIE(InfoExtractor):
timestamp = parse_iso8601(timestamp + ' +0200', ' ')
thumbnails = [{
'url': self._proto_relative_url(thumbnail)
'url': self._proto_relative_url(thumbnail),
} for thumbnail in video.get('thumbnails', [])]
tags = [tag['title'] for tag in video.get('tags') or []]