Bug 1654937 - [lint] Fix test_flake8.py::test_lint_excluded_file on Windows, r=linter-reviewers,sylvestre

Differential Revision: https://phabricator.services.mozilla.com/D86411
This commit is contained in:
Andrew Halberstadt 2020-08-10 09:37:29 +00:00
Родитель ab02d889fb
Коммит 9fb7a14b52
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -9,6 +9,7 @@ import subprocess
import sys
import mozfile
import mozpack.path as mozpath
from mozlint import result
from mozlint.pathutils import expand_exclusions
@ -131,7 +132,7 @@ def lint(paths, config, **lintargs):
# Ignore exclude rules if `--no-filter` was passed in.
config.setdefault("exclude", [])
if lintargs.get("use_filters", True):
config["exclude"].extend(self.options.exclude)
config["exclude"].extend(map(mozpath.normpath, self.options.exclude))
# Since we use the root .flake8 file to store exclusions, we haven't
# properly filtered the paths through mozlint's `filterpaths` function