Pylint and fixing error type
This commit is contained in:
@@ -151,20 +151,22 @@ class RedditVideoMIMEParser(BaseMIMEParser):
|
||||
|
||||
|
||||
class ImgurApiMIMEParser(BaseMIMEParser):
|
||||
"""
|
||||
"""
|
||||
Imgur now provides a json API exposing its entire infrastructure. Each Imgur
|
||||
page has an associated hash and can either contain an album, a gallery,
|
||||
or single image.
|
||||
|
||||
|
||||
The default client token for RTV is shared among users and allows a maximum
|
||||
global number of requests per day of 12,500. If we find that this limit is
|
||||
not sufficient for all of rtv's traffic, this method will be revisited.
|
||||
|
||||
|
||||
Reference:
|
||||
https://apidocs.imgur.com
|
||||
"""
|
||||
CLIENT_ID = None
|
||||
pattern = re.compile(r'https?://(w+\.)?(m\.)?imgur\.com/((?P<domain>a|album|gallery)/)?(?P<hash>[a-zA-Z0-9]+)$')
|
||||
pattern = re.compile(
|
||||
r'https?://(w+\.)?(m\.)?imgur\.com/'
|
||||
r'((?P<domain>a|album|gallery)/)?(?P<hash>[a-zA-Z0-9]+)$')
|
||||
|
||||
@classmethod
|
||||
def get_mimetype(cls, url):
|
||||
|
||||
@@ -29,7 +29,7 @@ def patch_webbrowser():
|
||||
"""
|
||||
Patch webbrowser on macOS to support setting BROWSER=firefox,
|
||||
BROWSER=chrome, etc..
|
||||
|
||||
|
||||
https://bugs.python.org/issue31348
|
||||
"""
|
||||
|
||||
@@ -44,7 +44,7 @@ def patch_webbrowser():
|
||||
browser = webbrowser.MacOSXOSAScript(cmdline)
|
||||
try:
|
||||
webbrowser.register(cmdline, None, browser, update_tryorder=-1)
|
||||
except AttributeError:
|
||||
except TypeError:
|
||||
# 3.7 nightly build changed the method signature
|
||||
# pylint: disable=unexpected-keyword-arg
|
||||
webbrowser.register(cmdline, None, browser, preferred=True)
|
||||
|
||||
@@ -775,7 +775,7 @@ class Terminal(object):
|
||||
|
||||
out = '\n'.join(stack)
|
||||
return out
|
||||
|
||||
|
||||
def clear_screen(self):
|
||||
"""
|
||||
In the beginning this always called touchwin(). However, a bug
|
||||
@@ -785,14 +785,14 @@ class Terminal(object):
|
||||
this in their tmux.conf or .bashrc file which can cause issues.
|
||||
Using clearok() instead seems to fix the problem, with the trade off
|
||||
of slightly more expensive screen refreshes.
|
||||
|
||||
|
||||
Update: It was discovered that using clearok() introduced a
|
||||
separate bug for urxvt users in which their screen flashed when
|
||||
scrolling. Heuristics were added to make it work with as many
|
||||
configurations as possible. It's still not perfect
|
||||
(e.g. urxvt + xterm-256color) will screen flash, but it should
|
||||
work in all cases if the user sets their TERM correctly.
|
||||
|
||||
|
||||
Reference:
|
||||
https://github.com/michael-lazar/rtv/issues/343
|
||||
https://github.com/michael-lazar/rtv/issues/323
|
||||
|
||||
Reference in New Issue
Block a user