From 056e7ac7467846bd9f9dccbd29624d1071a091d3 Mon Sep 17 00:00:00 2001 From: Lindsay Stevens Date: Tue, 29 Nov 2022 17:29:14 +1100 Subject: [PATCH] fix: linter check for black and isort not failing when changes required (#631) - black and isort returncode is 0 when fixes required and applied, so add arguments that make it returncode 1 when fixes required - flake8 and pycodestyle return 1 already --- .github/workflows/verify.yml | 4 ++-- pyxform/xlsparseutils.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index bad0dea8..41ee83f5 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -30,8 +30,8 @@ jobs: pip list # Linters. - - run: black pyxform tests - - run: isort pyxform tests + - run: black pyxform tests --check --diff + - run: isort pyxform tests --check-only --diff - run: flake8 pyxform tests - run: pycodestyle pyxform tests diff --git a/pyxform/xlsparseutils.py b/pyxform/xlsparseutils.py index 9a10a770..58e77362 100644 --- a/pyxform/xlsparseutils.py +++ b/pyxform/xlsparseutils.py @@ -1,7 +1,7 @@ import re -from pyxform import constants from typing import KeysView, Optional +from pyxform import constants from pyxform.utils import levenshtein_distance # http://www.w3.org/TR/REC-xml/