Skip to content

Commit db9d9cc

Browse files
committed
scripts: use venvstarter manager for lint and format
1 parent 8277ed7 commit db9d9cc

File tree

7 files changed

+14
-21
lines changed

7 files changed

+14
-21
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434

3535
- run: python -m pip install pip venvstarter -U
3636

37-
- run: ./tools/black/setup_venv
37+
- run: ./tools/black
3838

3939
- name: Ensure code is formatted
4040
run: |

format

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
set -e
44

5-
cd $(git rev-parse --show-toplevel)
5+
cd "$(git rev-parse --show-toplevel)"
66

7-
./tools/black/setup_venv
8-
9-
./tools/black/.black/bin/black alt_pytest_asyncio
10-
./tools/black/.black/bin/noy_black $(find tests -name '*.py')
7+
./tools/black black alt_pytest_asyncio
8+
./tools/black noy_black $(find tests -name '*.py')

tools/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.pylama
1+
.noy_pylama
2+
.black

tools/black

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env python3
2+
3+
__import__("venvstarter").manager(None).named(".black").add_pypi_deps(
4+
"noy_black==0.2.1", "regex==2021.9.30"
5+
).run()

tools/black/.gitignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

tools/black/setup_venv

Lines changed: 0 additions & 10 deletions
This file was deleted.

tools/pylama

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env python3
22

3-
from venvstarter import ignite
4-
5-
ignite(__file__, "noy_pylama", deps=["pylama==7.7.1", "noseOfYeti==2.0.2"], min_python_version=3.6)
3+
__import__("venvstarter").manager("noy_pylama").add_pypi_deps(
4+
"pylama==7.7.1", "noseOfYeti==2.0.2"
5+
).run()

0 commit comments

Comments
 (0)