Fix 'W605 invalid escape sequence' errors from pycodestyle
This commit is contained in:
@@ -41,7 +41,7 @@ class TestDumpToNeo4jCommandBase(SharedModuleStoreTestCase):
|
||||
"""
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
"""
|
||||
r"""
|
||||
Creates two courses; one that's just a course module, and one that
|
||||
looks like:
|
||||
course
|
||||
|
||||
@@ -82,7 +82,7 @@ def _get_username_from_social_link(platform_name, new_social_link):
|
||||
parse_result = urlparse(new_social_link)
|
||||
url_domain_and_path = parse_result[1] + parse_result[2]
|
||||
url_stub = re.escape(settings.SOCIAL_PLATFORMS[platform_name]['url_stub'])
|
||||
username_match = re.search('(www\.)?' + url_stub + '(?P<username>.*?)[/]?$', url_domain_and_path, re.IGNORECASE)
|
||||
username_match = re.search(r'(www\.)?' + url_stub + r'(?P<username>.*?)[/]?$', url_domain_and_path, re.IGNORECASE)
|
||||
if username_match:
|
||||
username = username_match.group('username')
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user