8000 Stubtest: Link directly to line by Avasam · Pull Request #14437 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

Stubtest: Link directly to line #14437

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

Merged
merged 4 commits into from
Feb 18, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Link directly to line
This format allows editors that support linking to specific lines in files to go directly to the right line.
  • Loading branch information
Avasam authored Jan 12, 2023
commit 52fa13c9a54da2003b8cdb2507408214d2017c33
8 changes: 4 additions & 4 deletions mypy/stubtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ def get_description(self, concise: bool = False) -> str:
stub_file = stub_node.path or None

stub_loc_str = ""
if stub_line:
stub_loc_str += f" at line {stub_line}"
if stub_file:
stub_loc_str += f" in file {Path(stub_file)}"
if stub_line:
stub_loc_str += f":{stub_line}"

runtime_line = None
runtime_file = None
Expand All @@ -147,10 +147,10 @@ def get_description(self, concise: bool = False) -> str:
pass

runtime_loc_str = ""
if runtime_line:
runtime_loc_str += f" at line {runtime_line}"
if runtime_file:
runtime_loc_str += f" in file {Path(runtime_file)}"
if runtime_line:
runtime_loc_str += f":{runtime_line}"

output = [
_style("error: ", color="red", bold=True),
Expand Down
0