1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2025-10-31 22:55:18 +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:
sepro
2024-06-12 01:09:58 +02:00
committed by GitHub
parent db50f19d76
commit add96eb9f8
915 changed files with 7027 additions and 7246 deletions

View File

@@ -27,7 +27,7 @@ class RadLiveIE(InfoExtractor):
'channel': 'Proximity',
'channel_id': '9ce6dd01-70a4-4d59-afb6-d01f807cd009',
'channel_url': 'https://rad.live/content/channel/9ce6dd01-70a4-4d59-afb6-d01f807cd009',
}
},
}, {
'url': 'https://rad.live/content/episode/bbcf66ec-0d02-4ca0-8dc0-4213eb2429bf',
'md5': '40b2175f347592125d93e9a344080125',
@@ -104,7 +104,7 @@ class RadLiveSeasonIE(RadLiveIE): # XXX: Do not subclass from concrete IE
@classmethod
def suitable(cls, url):
return False if RadLiveIE.suitable(url) else super(RadLiveSeasonIE, cls).suitable(url)
return False if RadLiveIE.suitable(url) else super().suitable(url)
def _real_extract(self, url):
season_id = self._match_id(url)
@@ -154,7 +154,7 @@ query WebChannelListing ($lrn: ID!) {
@classmethod
def suitable(cls, url):
return False if RadLiveIE.suitable(url) else super(RadLiveChannelIE, cls).suitable(url)
return False if RadLiveIE.suitable(url) else super().suitable(url)
def _real_extract(self, url):
channel_id = self._match_id(url)
@@ -164,8 +164,8 @@ query WebChannelListing ($lrn: ID!) {
headers={'Content-Type': 'application/json'},
data=json.dumps({
'query': self._QUERY,
'variables': {'lrn': f'lrn:12core:media:content:channel:{channel_id}'}
}).encode('utf-8'))
'variables': {'lrn': f'lrn:12core:media:content:channel:{channel_id}'},
}).encode())
data = traverse_obj(graphql, ('data', 'channel'))
if not data: