Skip to content

Commit 37f04ec

Browse files
committed
Move script
1 parent 470170d commit 37f04ec

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/labels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ jobs:
1515
with:
1616
python-version: '3.11'
1717
- run: python -m pip install requests
18-
- run: python .github/workflows/labels.py
18+
- run: python labels/labels.py

.github/workflows/labels.py renamed to labels/labels.py

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

33
import requests
44

5-
dir = Path('labels')
5+
dir = Path(__file__).parent
66

77
# Remove labels/*.txt.
88
for child in dir.iterdir():
@@ -25,7 +25,9 @@
2525
# Write one file for every label.
2626
for label, tests in labels.items():
2727
tests.sort()
28-
with dir.joinpath(f'{label}.txt').open(mode='w') as f:
28+
filename = f'{label}.txt'
29+
print(f'Writing {len(tests)} tests to {filename}')
30+
with dir.joinpath(filename).open(mode='w') as f:
2931
for test in tests:
3032
f.write(test)
3133
f.write('\n')

0 commit comments

Comments
 (0)