Skip to content

Commit 4872c30

Browse files
authored
Fix divider lines in stubtest_third_party.py (#11799)
1 parent ff946a7 commit 4872c30

File tree

3 files changed

+10
-8
lines changed

3 files changed

+10
-8
lines changed

scripts/stubsabot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -498,7 +498,7 @@ async def determine_action(stub_path: Path, session: aiohttp.ClientSession) -> U
498498
"Release": f"{pypi_info.pypi_root}/{relevant_version}",
499499
"Homepage": project_urls.get("Homepage"),
500500
"Repository": stub_info.upstream_repository,
501-
"Typeshed stubs": f"https://github.com/{TYPESHED_OWNER}/typeshed/tree/main/{stub_info.distribution}",
501+
"Typeshed stubs": f"https://github.com/{TYPESHED_OWNER}/typeshed/tree/main/stubs/{stub_info.distribution}",
502502
"Changelog": project_urls.get("Changelog") or project_urls.get("Changes") or project_urls.get("Change Log"),
503503
}
504504
links = {k: v for k, v in maybe_links.items() if v is not None}

tests/stubtest_third_party.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,11 @@ def run_stubtest(
134134
print_error("fail\n")
135135

136136
print_divider()
137-
print("Commands run:")
137+
print("Commands run:", file=sys.stderr)
138138
print_commands(dist, pip_cmd, stubtest_cmd, mypypath)
139139

140140
print_divider()
141-
print("Command output:\n")
141+
print("Command output:\n", file=sys.stderr)
142142
print_command_output(e)
143143

144144
print_divider()

tests/utils.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,27 +41,29 @@ def strip_comments(text: str) -> str:
4141
def print_command(cmd: str | Iterable[str]) -> None:
4242
if not isinstance(cmd, str):
4343
cmd = " ".join(cmd)
44-
print(colored(f"Running: {cmd}", "blue"))
44+
print(colored(f"Running: {cmd}", "blue"), file=sys.stderr)
4545

4646

4747
def print_error(error: str, end: str = "\n", fix_path: tuple[str, str] = ("", "")) -> None:
4848
error_split = error.split("\n")
4949
old, new = fix_path
5050
for line in error_split[:-1]:
51-
print(colored(line.replace(old, new), "red"))
52-
print(colored(error_split[-1], "red"), end=end)
51+
print(colored(line.replace(old, new), "red"), file=sys.stderr)
52+
print(colored(error_split[-1], "red"), end=end, file=sys.stderr)
5353

5454

5555
def print_success_msg() -> None:
56-
print(colored("success", "green"))
56+
print(colored("success", "green"), file=sys.stderr)
5757

5858

5959
def print_divider() -> None:
6060
"""Print a row of * symbols across the screen.
6161
6262
This can be useful to divide terminal output into separate sections.
6363
"""
64-
print("*" * 70)
64+
print(file=sys.stderr)
65+
print("*" * 70, file=sys.stderr)
66+
print(file=sys.stderr)
6567

6668

6769
# ====================================================================

0 commit comments

Comments
 (0)