Pylint and fixing error type
This commit is contained in:
@@ -164,7 +164,9 @@ class ImgurApiMIMEParser(BaseMIMEParser):
|
|||||||
https://apidocs.imgur.com
|
https://apidocs.imgur.com
|
||||||
"""
|
"""
|
||||||
CLIENT_ID = None
|
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
|
@classmethod
|
||||||
def get_mimetype(cls, url):
|
def get_mimetype(cls, url):
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ def patch_webbrowser():
|
|||||||
browser = webbrowser.MacOSXOSAScript(cmdline)
|
browser = webbrowser.MacOSXOSAScript(cmdline)
|
||||||
try:
|
try:
|
||||||
webbrowser.register(cmdline, None, browser, update_tryorder=-1)
|
webbrowser.register(cmdline, None, browser, update_tryorder=-1)
|
||||||
except AttributeError:
|
except TypeError:
|
||||||
# 3.7 nightly build changed the method signature
|
# 3.7 nightly build changed the method signature
|
||||||
# pylint: disable=unexpected-keyword-arg
|
# pylint: disable=unexpected-keyword-arg
|
||||||
webbrowser.register(cmdline, None, browser, preferred=True)
|
webbrowser.register(cmdline, None, browser, preferred=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user