Skip to content

Commit 20814e1

Browse files
committed
Check version
1 parent 5e257b5 commit 20814e1

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ dependencies = [
1818
"async-substrate-interface>=1.4.2",
1919
"aiohttp~=3.10.2",
2020
"backoff~=2.2.1",
21-
"click>=8.2.0",
2221
"GitPython>=3.0.0",
2322
"netaddr~=1.3.0",
2423
"numpy>=2.0.1,<3.0.0",
@@ -29,6 +28,7 @@ dependencies = [
2928
"scalecodec==1.2.11",
3029
"typer>=0.16",
3130
"bittensor-wallet>=3.0.7",
31+
"packaging",
3232
"plotille>=5.0.0",
3333
"plotly>=6.0.0",
3434
]

tests/e2e_tests/utils.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import importlib
12
import inspect
23
import os
34
import re
@@ -6,10 +7,12 @@
67
import sys
78
from typing import TYPE_CHECKING, Optional
89

9-
from bittensor_cli.cli import CLIManager
1010
from bittensor_wallet import Keypair, Wallet
11+
from packaging.version import parse as parse_version, Version
1112
from typer.testing import CliRunner
1213

14+
from bittensor_cli.cli import CLIManager
15+
1316
if TYPE_CHECKING:
1417
from async_substrate_interface.async_substrate import AsyncSubstrateInterface
1518

@@ -55,7 +58,10 @@ def exec_command(
5558
extra_args.extend(["--network", "ws://127.0.0.1:9945"])
5659

5760
# Capture stderr separately from stdout
58-
runner = CliRunner()
61+
if parse_version(importlib.metadata.version("click")) < Version("8.2.0"):
62+
runner = CliRunner(mix_stderr=False)
63+
else:
64+
runner = CliRunner()
5965
# Prepare the command arguments
6066
args = [
6167
command,

0 commit comments

Comments
 (0)