Skip to content

Commit 75741d1

Browse files
committed
Provide script to enable auto formating using yapf
Signed-off-by: Pascal Nasahl <nasahlpa@lowrisc.org>
1 parent ce17276 commit 75741d1

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

python-requirements-lint.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@
55
# Linters
66
flake8==7.2.0
77
isort==5.13.2
8-
yapf==0.32.0
8+
yapf==0.43.0

util/fixlintpy.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
# Lint all Python sources using the specified lint tools
4+
FILE_PATHS=`find . -not \( -path './.venv' -prune \) \
5+
-not \( -path './util/vendor' -prune \) \
6+
-name '*.py'`
7+
8+
./util/vendor/lowrisc_opentitan/lintpy.py -f ${FILE_PATHS} --tools yapf --fix

0 commit comments

Comments
 (0)