File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ dependencies = [
28
28
" scalecodec==1.2.11" ,
29
29
" typer>=0.16" ,
30
30
" bittensor-wallet>=3.0.7" ,
31
+ " packaging" ,
31
32
" plotille>=5.0.0" ,
32
33
" plotly>=6.0.0" ,
33
34
]
Original file line number Diff line number Diff line change
1
+ import importlib
1
2
import inspect
2
3
import os
3
4
import re
6
7
import sys
7
8
from typing import TYPE_CHECKING , Optional
8
9
9
- from bittensor_cli .cli import CLIManager
10
10
from bittensor_wallet import Keypair , Wallet
11
+ from packaging .version import parse as parse_version , Version
11
12
from typer .testing import CliRunner
12
13
14
+ from bittensor_cli .cli import CLIManager
15
+
13
16
if TYPE_CHECKING :
14
17
from async_substrate_interface .async_substrate import AsyncSubstrateInterface
15
18
@@ -55,7 +58,10 @@ def exec_command(
55
58
extra_args .extend (["--network" , "ws://127.0.0.1:9945" ])
56
59
57
60
# 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 ()
59
65
# Prepare the command arguments
60
66
args = [
61
67
command ,
You can’t perform that action at this time.
0 commit comments