We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c82ee8 commit f2af18bCopy full SHA for f2af18b
bittensor_cli/version.py
@@ -1,4 +1,13 @@
1
import re
2
+import toml
3
+import pathlib
4
+
5
6
+def get_toml_version():
7
+ toml_file = pathlib.Path(__file__).parent.parent / "pyproject.toml"
8
+ with open(toml_file, "r") as f:
9
+ tf = toml.load(f)
10
+ return tf["project"]["version"]
11
12
13
def version_as_int(version):
@@ -16,5 +25,9 @@ def version_as_int(version):
16
25
return __version_as_int__
17
26
18
27
19
-__version__ = "9.2.0"
28
+__version__ = get_toml_version()
20
29
__version_as_int__ = version_as_int(__version__)
30
31
32
+if __name__ == "__main__":
33
+ print(get_toml_version())
0 commit comments