From 74cbf828c3a548b1b6138da554c2642bd7ddceee Mon Sep 17 00:00:00 2001 From: Jan-Eric Nitschke <47750513+JanEricNitschke@users.noreply.github.com> Date: Tue, 18 Jun 2024 21:29:51 +0200 Subject: [PATCH 1/2] Update CI --- .github/workflows/build.yaml | 6 +++--- .pre-commit-config.yaml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index d4dc45c..cdf9644 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -30,17 +30,17 @@ jobs: - name: Lint with ruff uses: chartboost/ruff-action@v1 with: - version: 0.4.1 + version: 0.4.9 - name: Check formatting with ruff uses: chartboost/ruff-action@v1 with: - version: 0.4.1 + version: 0.4.9 args: format - name: Typecheck with pyright uses: jakebailey/pyright-action@v2 with: - version: 1.1.359 + version: 1.1.367 - name: Thorough check with pylint run: pylint pymend diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index da159b1..3c4eb06 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,7 +30,7 @@ repos: - id: check-builtin-literals language: python - repo: "https://github.com/charliermarsh/ruff-pre-commit" - rev: v0.4.1 + rev: v0.4.9 hooks: - id: ruff args: @@ -38,7 +38,7 @@ repos: - "--exit-non-zero-on-fix" - id: ruff-format - repo: https://github.com/crate-ci/typos - rev: v1.20.9 + rev: v1.22.7 hooks: - id: typos args: [] From 7e7cc9e66b06547b74647ddfc58d03b124402081 Mon Sep 17 00:00:00 2001 From: Jan-Eric Nitschke <47750513+JanEricNitschke@users.noreply.github.com> Date: Tue, 18 Jun 2024 21:34:50 +0200 Subject: [PATCH 2/2] Remove superflous noqa --- pymend/file_parser.py | 2 +- pymend/pymend.py | 2 +- pymend/types.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pymend/file_parser.py b/pymend/file_parser.py index ac5837c..118810e 100644 --- a/pymend/file_parser.py +++ b/pymend/file_parser.py @@ -102,7 +102,7 @@ def parse_from_ast( nodes_of_interest: list[ElementDocstring] = [] try: file_ast = ast.parse(self.file_content) - except Exception as exc: # noqa: BLE001 + except Exception as exc: msg = f"Failed to parse source file AST: {exc}\n" raise AssertionError(msg) from exc for node in ast.walk(file_ast): diff --git a/pymend/pymend.py b/pymend/pymend.py index 2a869ab..5e77f3d 100644 --- a/pymend/pymend.py +++ b/pymend/pymend.py @@ -355,7 +355,7 @@ def assert_equality(self, src_lines: str, dst_lines: str) -> None: """ try: src_ast = ast.parse(src_lines) - except Exception as exc: # noqa: BLE001 + except Exception as exc: msg = f"Failed to parse source file AST: {exc}\n" raise AssertionError(msg) from exc try: diff --git a/pymend/types.py b/pymend/types.py index 6ad9d46..40e0ddb 100644 --- a/pymend/types.py +++ b/pymend/types.py @@ -82,7 +82,7 @@ def output_docstring( self._escape_triple_quotes() try: parsed = dsp.parse(self.docstring, style=input_style) - except Exception as e: # noqa: BLE001 + except Exception as e: msg = f"Failed to parse docstring for `{self.name}` with error: `{e}`" raise AssertionError(msg) from e self._fix_docstring(parsed, settings)