Skip to content

Commit 7739f80

Browse files
committed
Importlib metadata
1 parent b3ea6e0 commit 7739f80

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

bittensor_cli/version.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@
22
import re
33

44

5-
def get_toml_version():
6-
toml_file = pathlib.Path(__file__).parent.parent / "pyproject.toml"
7-
with open(toml_file, "r") as f:
8-
tf = toml.load(f)
9-
return tf["project"]["version"]
10-
11-
125
def version_as_int(version):
136
_core_version = re.match(r"^\d+\.\d+\.\d+", version).group(0)
147
_version_split = _core_version.split(".")
@@ -26,7 +19,3 @@ def version_as_int(version):
2619

2720
__version__ = importlib.metadata.version("bittensor-cli")
2821
__version_as_int__ = version_as_int(__version__)
29-
30-
31-
if __name__ == "__main__":
32-
print(get_toml_version())

0 commit comments

Comments
 (0)