Merge pull request #24330 from eduNEXT/lmm/regex_deprecation_warning

[BD-6] Fix invalid escape sequence deprecation warning.
This commit is contained in:
Awais Qureshi
2020-06-30 19:13:33 +05:00
committed by GitHub

View File

@@ -35,11 +35,11 @@ def seperate_warnings_by_location(warnings_data):
# first create regex for each n file location
warnings_locations = {
".*/python\d\.\d/site-packages/.*\.py": "python", # noqa pylint: disable=W1401
".*/edx-platform/lms/.*\.py": "lms", # noqa pylint: disable=W1401
".*/edx-platform/openedx/.*\.py": "openedx", # noqa pylint: disable=W1401
".*/edx-platform/cms/.*\.py": "cms", # noqa pylint: disable=W1401
".*/edx-platform/common/.*\.py": "common", # noqa pylint: disable=W1401
r".*/python\d\.\d/site-packages/.*\.py": "python", # noqa pylint: disable=W1401
r".*/edx-platform/lms/.*\.py": "lms", # noqa pylint: disable=W1401
r".*/edx-platform/openedx/.*\.py": "openedx", # noqa pylint: disable=W1401
r".*/edx-platform/cms/.*\.py": "cms", # noqa pylint: disable=W1401
r".*/edx-platform/common/.*\.py": "common", # noqa pylint: disable=W1401
}
# separate into locations flow:
@@ -92,7 +92,7 @@ def read_warning_data(dir_path):
# TODO(jinder): currently this is hard-coded in, maybe create a constants file with info
# THINK(jinder): but creating file for one constant seems overkill
warnings_file_name_regex = (
"pytest_warnings_?\d*\.json" # noqa pylint: disable=W1401
r"pytest_warnings_?\d*\.json" # noqa pylint: disable=W1401
)
# iterate through files_in_dir and see if they match our know file name pattern