Skip to content

Commit 07374e1

Browse files
committed
Move tools.py to cli.py, add bin/tools.py compatibility script
1 parent 63f11f4 commit 07374e1

File tree

4 files changed

+15
-6
lines changed

4 files changed

+15
-6
lines changed

bapctools/__main__.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import sys
1+
from bapctools.cli import main
22

3-
from bapctools.tools import main
43

5-
6-
if __name__ == "__main__":
7-
sys.exit(main())
4+
main()
File renamed without changes.

bin/tools.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/usr/bin/env python3
2+
# PYTHON_ARGCOMPLETE_OK
3+
4+
from pathlib import Path
5+
import sys
6+
7+
if __name__ == "__main__":
8+
sys.path.append(str(Path(__file__).parent.parent.resolve()))
9+
10+
from bapctools.cli import main
11+
12+
main()

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ dependencies = [
1313
]
1414

1515
[project.scripts]
16-
bt = "bapctools.tools:main"
16+
bt = "bapctools.cli:main"
1717

1818
[build-system]
1919
requires = ["hatchling"]

0 commit comments

Comments
 (0)