Fix 'W605 invalid escape sequence' errors from pycodestyle

This commit is contained in:
Ned Batchelder
2018-11-02 06:06:43 -04:00
parent 428c061b07
commit 2d438d8bb5
6 changed files with 13 additions and 13 deletions

View File

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

View File

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