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

Clean up the imports in commands/stake.py #1951

Merged
merged 2 commits into from
May 29, 2024
Merged
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
35 changes: 13 additions & 22 deletions bittensor/commands/stake.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,22 @@
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

import sys
import argparse
import bittensor
from tqdm import tqdm
import os
import sys
from typing import List, Union, Optional, Dict, Tuple

from rich.prompt import Confirm, Prompt
from rich.table import Table
from tqdm import tqdm

import bittensor
from bittensor.utils.balance import Balance
from typing import List, Union, Optional, Dict, Tuple
from .utils import get_hotkey_wallets_for_wallet
from .utils import (
get_hotkey_wallets_for_wallet,
get_delegates_details,
DelegatesDetails,
)
from . import defaults

console = bittensor.__console__
Expand Down Expand Up @@ -291,23 +299,6 @@ def add_args(cls, parser: argparse.ArgumentParser):
bittensor.subtensor.add_args(stake_parser)


### Stake list.
import argparse
import bittensor
from tqdm import tqdm
from rich.table import Table
from rich.prompt import Prompt
from typing import Dict, Union, List, Tuple
from .utils import get_delegates_details, DelegatesDetails
from . import defaults

console = bittensor.__console__

import os
import bittensor
from typing import List, Tuple, Optional, Dict


def _get_coldkey_wallets_for_path(path: str) -> List["bittensor.wallet"]:
try:
wallet_names = next(os.walk(os.path.expanduser(path)))[1]
Expand Down