diff --git a/mypy/build.py b/mypy/build.py index d70b421c380b0..e6f597af31bc9 100644 --- a/mypy/build.py +++ b/mypy/build.py @@ -2396,7 +2396,7 @@ def find_module_and_diagnose(manager: BuildManager, and not options.use_builtins_fixtures and not options.custom_typeshed_dir): raise CompileError([ - 'mypy: "%s" shadows library module "%s"' % (result, id), + 'mypy: "%s" shadows library module "%s"' % (os.path.relpath(result), id), 'note: A user-defined top-level module with name "%s" is not supported' % id ]) return (result, follow_imports)