New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add basic support for user-defined mypy plugins #3517

merged 6 commits into from Jun 13, 2017
Jump to file or symbol
Failed to load files and symbols.
+6 −4
Diff settings


Just for now

Viewing a subset of changes. View all

Attempt to fix path normalization in test cases in Windows

Previously we sometimes normalized to Windows paths and sometimes
to Linux paths. Now switching to always use Linux paths.
  • Loading branch information...
JukkaL committed Jun 9, 2017
commit d75842ce8268ad4a24114c2aa50ebc7e2464bb61
@@ -455,16 +455,17 @@ def expand_errors(input: List[str], output: List[str], fnam: str) -> None:
def fix_win_path(line: str) -> str:
r"""Changes paths to Windows paths in error messages.
r"""Changes Windows paths to Linux paths in error messages.
E.g. foo/ -> foo\
E.g. foo\ -> foo/
line = line.replace(root_dir, root_dir.replace('\\', '/'))
m = re.match(r'^([\S/]+):(\d+:)?(\s+.*)', line)
if not m:
return line
filename, lineno, message = m.groups()
return '{}:{}{}'.format(filename.replace('/', '\\'),
return '{}:{}{}'.format(filename.replace('\\', '/'),
lineno or '', message)
@@ -262,7 +262,8 @@ def find_error_paths(self, a: List[str]) -> Set[str]:
for line in a:
m = re.match(r'([^\s:]+):\d+: error:', line)
if m:
p ='/', os.path.sep)
# Normalize to Linux paths.
p =, '/')
return hits
ProTip! Use n and p to navigate between commits in a pull request.