diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index aeb383ff..658aa9e2 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -14,10 +14,12 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Install dependencies + run: | + pip install toml yapf - name: run YAPF to test if python code is correctly formatted - uses: AlexanderMelde/yapf-action@master - with: - args: --verbose --style=yapf.ini --exclude=**/docs/* + run: | + yapf --diff --recursive --verbose --exclude=**/docs/* $GITHUB_WORKSPACE - uses: actions/setup-python@v2 with: python-version: 3.8 diff --git a/pyproject.toml b/pyproject.toml index 5a89c228..9952a694 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,10 @@ coverage = "*" isort = "^5.7" yapf = "^0.31" +[tool.yapf] +based_on_style = "pep8" +column_limit = 160 + [tool.isort] line_length = 160 diff --git a/yapf.ini b/yapf.ini deleted file mode 100644 index 216e5e3f..00000000 --- a/yapf.ini +++ /dev/null @@ -1,3 +0,0 @@ -[style] -based_on_style = pep8 -column_limit = 160 \ No newline at end of file