Skip to content

Commit ad798ca

Browse files
authored
Use specific version of yapf to avoid format diffs (#634)
Switch to Google's open-source project formatting conventions, `yapf`, except preserve our 4-space indentation. See #635 for results. If we need to change things even more, now is a good time for feedback.
1 parent 6a78266 commit ad798ca

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ install-autogen = """curl -fsSL --output /tmp/autogen.zip "https://github.com/mb
5858
mv /tmp/autogen/autogen-*/* /tmp/autogen && rm -rf /tmp/autogen/autogen-* &&
5959
sudo chmod a+rx /tmp/autogen/autogen.sh"""
6060
# TODO: install in Mac/Windows
61-
install-yapf = """sudo apt-get install -y yapf3 python3-yapf || echo 'yapf could not be installed'"""
61+
install-yapf = """pip3 install yapf==0.40.2 --break-system-packages || echo 'yapf could not be installed'"""
6262
install-deps = "hatch run install-autogen && hatch run install-yapf"
6363

6464
integration-test = "pytest {args:integration_tests}"

tools/GeneratePythonLibrary.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function reset {
9090

9191
echo "yapf3 -ir src/"
9292
if [ -x "$(command -v yapf3)" ]; then
93-
yapf3 -ir src/
93+
yapf3 -ir --style yapf src/
9494
else
9595
echo "yapf3 is not installed on your system"
9696
fi

0 commit comments

Comments
 (0)