Skip to content

Commit 6f69aec

Browse files
committed
Added update-langs root session
1 parent 98c2980 commit 6f69aec

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

noxfile.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,16 @@ def session(func) : return nox.session(venv_backend='none', name=func.__name__.r
66
def lint(session): # staged monorepo files
77
files = session.run('git', 'diff', '--cached', '--name-only', '--relative', silent=True, log=False).splitlines()
88
if files : session.run('pre-commit', 'run', '--files', *files, *session.posargs)
9-
109
@session
1110
def lint_all(session): # all monorepo files
1211
session.run('pre-commit', 'run', '--all-files', *session.posargs)
12+
13+
@session
14+
def update_langs(session): # update lang pkg data
15+
from pathlib import Path
16+
start_dir = Path.cwd()
17+
for subdir in Path(__file__).parent.glob('*-languages'):
18+
if subdir.is_dir():
19+
session.chdir(subdir)
20+
session.run('nox', '-s', 'update', *session.posargs, external=True)
21+
session.chdir(start_dir)

0 commit comments

Comments
 (0)