flake8: E303

E303 too many blank lines
This commit is contained in:
bastimeyer 2020-02-19 03:54:28 +01:00
parent 7f4f8f0ea5
commit 1878c59d75
17 changed files with 0 additions and 25 deletions

View File

@ -54,7 +54,6 @@ except ImportError:
html_unescape = unescape = HTMLParser().unescape
getargspec = getattr(inspect, "getfullargspec", inspect.getargspec)

View File

@ -54,7 +54,6 @@ class Delfi(Plugin):
data['message'], data['code']
))
def _get_streams(self):
res = self.session.http.get(self.url)
for div in itertags(res.text, 'div'):

View File

@ -277,5 +277,4 @@ class FunimationNow(Plugin):
log.error("Could not find experience ID?!")
__plugin__ = FunimationNow

View File

@ -17,7 +17,6 @@ class Picarto(Plugin):
RTMP_PLAYPATH = "golive+{channel}?token={token}"
HLS_URL = "https://{server}/hls/{channel}/index.m3u8?token={token}"
# Regex for all usable URLs
_url_re = re.compile(r"""
https?://(?:\w+\.)?picarto\.tv/(?:videopopout/)?([^&?/]+)
@ -40,7 +39,6 @@ class Picarto(Plugin):
)
)
@classmethod
def can_handle_url(cls, url):
return cls._url_re.match(url) is not None

View File

@ -144,7 +144,6 @@ class Pixiv(Plugin):
else:
log.error("Failed to log in.")
def _login_using_session_id_and_device_token(self, session_id, device_token):
res = self.session.http.get(self.login_url_get)
@ -154,7 +153,6 @@ class Pixiv(Plugin):
self.save_cookies()
log.info("Successfully set sessionId and deviceToken")
def hls_stream(self, hls_url):
log.debug("URL={0}".format(hls_url))
for s in HLSStream.parse_variant_playlist(self.session, hls_url).items():

View File

@ -7,7 +7,6 @@ from streamlink.plugin.api import useragents
from streamlink.stream import HLSStream
log = logging.getLogger(__name__)

View File

@ -140,7 +140,6 @@ class DASHStreamReader(SegmentedStreamReader):
log.debug("Opening DASH reader for: {0} ({1})".format(self.representation_id, self.mime_type))
class DASHStream(Stream):
__shortname__ = "dash"

View File

@ -367,7 +367,6 @@ class SegmentList(MPDNode):
else:
self.duration_seconds = None
self.initialization = self.only_child(Initialization)
self.segment_urls = self.children(SegmentURL, minimum=1)

View File

@ -39,7 +39,6 @@ class TestPluginSchoolism(unittest.TestCase):
self.assertIsNotNone(data)
self.assertEqual(2, len(data))
def test_playlist_parse(self):
without_subs = """var allVideos=[
{sources:[{type:"application/x-mpegurl",src:"https://d8u31iyce9xic.cloudfront.net/14/1/part1.m3u8?Policy=TOKEN&Signature=TOKEN&Key-Pair-Id=TOKEN",title:"Gesture Drawing - Lesson 1 - Part 1",playlistTitle:"Part 1",}],},

View File

@ -341,7 +341,5 @@ class TestDASHStreamWorker(unittest.TestCase):
self.assertEqual(representation_aud, DASHStreamWorker.get_representation(mpd, 1, "audio/aac"))
if __name__ == "__main__":
unittest.main()

View File

@ -202,7 +202,6 @@ class TestMPDParser(unittest.TestCase):
'http://test.se/video/1014000.mp4',
'http://test.se/video/1015000.mp4'])
def test_tsegment_t_is_none_1895(self):
"""
Verify the fix for https://github.com/streamlink/streamlink/issues/1895

View File

@ -104,7 +104,6 @@ class TestCache(unittest.TestCase):
self.cache.set("test3", 3)
self.cache.set("test4", 4)
self.assertDictEqual(
{"test3": 3, "test4": 4},
self.cache.get_all())
@ -113,7 +112,6 @@ class TestCache(unittest.TestCase):
self.cache.set("test1", 1)
self.cache.set("test2", 2, -1)
self.assertDictEqual(
{"test1": 1},
self.cache.get_all())

View File

@ -14,7 +14,6 @@ else:
from io import StringIO
class TestLogging(unittest.TestCase):
@classmethod
def _new_logger(cls):

View File

@ -87,7 +87,6 @@ class TestArguments(unittest.TestCase):
self.assertRaises(KeyError, lambda: list(args.requires("test1")))
def test_requires_cycle(self):
test1 = Argument("test1", requires="test2")
test2 = Argument("test2", requires="test1")

View File

@ -10,7 +10,6 @@ from streamlink.plugin import Plugin
class TestPlugin(unittest.TestCase):
def _create_cookie_dict(self, name, value, expires):
return {'version': 0, 'name': name, 'value': value,
'port': None, 'domain': "test.se", 'path': "/", 'secure': False,
@ -98,7 +97,6 @@ class TestPlugin(unittest.TestCase):
# non-empty cookiejar
self.assertTrue(len(session.http.cookies.get_dict()) > 0)
plugin.clear_cookies()
self.assertSequenceEqual(
Plugin.cache.set.mock_calls,
@ -121,7 +119,6 @@ class TestPlugin(unittest.TestCase):
# non-empty cookiejar
self.assertTrue(len(session.http.cookies.get_dict()) > 0)
plugin.clear_cookies(lambda c: c.name.endswith("2"))
self.assertSequenceEqual(
Plugin.cache.set.mock_calls,

View File

@ -197,6 +197,5 @@ class TestSession(unittest.TestCase):
self.assertEqual("https://testhttpsproxy.com", session.http.proxies['https'])
if __name__ == "__main__":
unittest.main()

View File

@ -4,7 +4,6 @@ from streamlink.utils.times import hours_minutes_seconds, seconds_to_hhmmss
class TestUtilsTimes(unittest.TestCase):
def test_hours_minutes_seconds(self):
self.assertEqual(hours_minutes_seconds("00:01:30"), 90)
self.assertEqual(hours_minutes_seconds("01:20:15"), 4815)
@ -28,7 +27,6 @@ class TestUtilsTimes(unittest.TestCase):
self.assertEqual(hours_minutes_seconds("1:10"), 70)
self.assertEqual(hours_minutes_seconds("10:00"), 600)
with self.assertRaises(ValueError):
hours_minutes_seconds("FOO")
@ -39,7 +37,6 @@ class TestUtilsTimes(unittest.TestCase):
hours_minutes_seconds("11:ERR:00")
def test_seconds_to_hhmmss(self):
self.assertEqual(seconds_to_hhmmss(0), "00:00:00")
self.assertEqual(seconds_to_hhmmss(1), "00:00:01")
self.assertEqual(seconds_to_hhmmss(60), "00:01:00")