Skip to content
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

[stubsabot] Bump networkx to 3.3 #30

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion stubs/networkx/METADATA.toml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.2.1"
version = "3.3"
upstream_repository = "https://github.com/networkx/networkx"
requires = ["numpy"]
partial_stub = true
Expand Down
4 changes: 2 additions & 2 deletions tests/stubtest_third_party.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ def run_stubtest(
print_error("fail\n")

print_divider()
print("Commands run:")
print("Commands run:", file=sys.stderr)
print_commands(dist, pip_cmd, stubtest_cmd, mypypath)

print_divider()
print("Command output:\n")
print("Command output:\n", file=sys.stderr)
print_command_output(e)

print_divider()
Expand Down
12 changes: 7 additions & 5 deletions tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,27 +41,29 @@ def strip_comments(text: str) -> str:
def print_command(cmd: str | Iterable[str]) -> None:
if not isinstance(cmd, str):
cmd = " ".join(cmd)
print(colored(f"Running: {cmd}", "blue"))
print(colored(f"Running: {cmd}", "blue"), file=sys.stderr)


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


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


def print_divider() -> None:
"""Print a row of * symbols across the screen.

This can be useful to divide terminal output into separate sections.
"""
print("*" * 70)
print(file=sys.stderr)
print("*" * 70, file=sys.stderr)
print(file=sys.stderr)


# ====================================================================
Expand Down
Loading