Skip to content

Commit 9563eac

Browse files
committed
Removes fuzzywuzzy and Levenshtein as dependencies
1 parent 11b87a2 commit 9563eac

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

bittensor_cli/src/commands/wallets.py

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from bittensor_wallet import Wallet, Keypair
1010
from bittensor_wallet.errors import KeyFileError
1111
from bittensor_wallet.keyfile import Keyfile
12-
from fuzzywuzzy import fuzz
1312
from rich import box
1413
from rich.align import Align
1514
from rich.table import Column, Table
@@ -1227,16 +1226,11 @@ async def overview(
12271226

12281227
if sort_by:
12291228
column_to_sort_by: int = 0
1230-
highest_matching_ratio: int = 0
12311229
sort_descending: bool = False # Default sort_order to ascending
12321230

12331231
for index, column in zip(range(len(table.columns)), table.columns):
1234-
# Fuzzy match the column name. Default to the first column.
12351232
column_name = column.header.lower().replace("[white]", "")
1236-
match_ratio = fuzz.ratio(sort_by.lower(), column_name)
1237-
# Finds the best matching column
1238-
if match_ratio > highest_matching_ratio:
1239-
highest_matching_ratio = match_ratio
1233+
if column_name == sort_by.lower().strip():
12401234
column_to_sort_by = index
12411235

12421236
if sort_order.lower() in {"desc", "descending", "reverse"}:

pyproject.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,12 @@ dependencies = [
2020
"backoff~=2.2.1",
2121
"click<8.2.0", # typer.testing.CliRunner(mix_stderr=) is broken in click 8.2.0+
2222
"GitPython>=3.0.0",
23-
"fuzzywuzzy~=0.18.0",
2423
"netaddr~=1.3.0",
2524
"numpy>=2.0.1,<3.0.0",
2625
"Jinja2",
2726
"pycryptodome>=3.0.0,<4.0.0",
2827
"PyYAML~=6.0.1",
2928
"pytest",
30-
"python-Levenshtein",
3129
"rich>=13.7,<15.0",
3230
"scalecodec==1.2.11",
3331
"typer>=0.12,<0.16",

0 commit comments

Comments
 (0)