Pylint and fixing error type

This commit is contained in:
Michael Lazar
2017-09-06 01:36:24 -04:00
parent b73e902d4a
commit b1b1a64854
3 changed files with 11 additions and 9 deletions

View File

@@ -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):

View File

@@ -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)