From 1254c35e26482216800b288a45f0e2f69803a62d Mon Sep 17 00:00:00 2001 From: James Addison Date: Mon, 26 Aug 2024 23:32:26 +0100 Subject: [PATCH 1/8] ci: update to `coactions/dynamic-matrix` v3 (latest) --- .github/workflows/tox.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index 16b969c..e1bd497 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Determine matrix id: generate_matrix - uses: coactions/matrix@main + uses: coactions/matrix@v3 with: other_names: | lint @@ -48,8 +48,8 @@ jobs: python -m pip install --upgrade pip pip install tox>=4.0 - - name: tox run -e ${{ matrix.passed_name }} - run: tox run -e ${{ matrix.passed_name }} + - name: ${{ matrix.command }} + run: ${{ matrix.command }} check: # This job does nothing and is only used for the branch protection if: always() From c563e3e2f0b69aafe782bfa1f8d87b8407f51cad Mon Sep 17 00:00:00 2001 From: James Addison Date: Mon, 26 Aug 2024 23:35:30 +0100 Subject: [PATCH 2/8] ci: prefer `matrix.name` as step name instead of command --- .github/workflows/tox.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index e1bd497..0a3d84b 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -48,7 +48,7 @@ jobs: python -m pip install --upgrade pip pip install tox>=4.0 - - name: ${{ matrix.command }} + - name: ${{ matrix.name }} run: ${{ matrix.command }} check: # This job does nothing and is only used for the branch protection From ed664f114c8302f3882ff7441461d286a9d8a0cf Mon Sep 17 00:00:00 2001 From: James Addison Date: Mon, 26 Aug 2024 23:40:03 +0100 Subject: [PATCH 3/8] pre-commit: remove py3.10 language default constraint --- .pre-commit-config.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4c2e43a..df9ba4b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,8 +1,4 @@ --- -default_language_version: - # Enforce use of py310 because pylint does not support py311 yet, causing - # failures for those happening to have that as default python. - python: python3.10 repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.5.0 # Use the ref you want to point at From eb47f7a69ce9b8e17b0a93d5b77047d53e734d76 Mon Sep 17 00:00:00 2001 From: James Addison Date: Mon, 26 Aug 2024 23:43:40 +0100 Subject: [PATCH 4/8] pyproject.toml: remove language-version constraint from `tomli` --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e6cc00f..1f9d67c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ dependencies = [ "docutils>=0.19,<0.21", "restructuredtext-lint>=0.7", "stevedore", - "tomli; python_version < '3.11'", + "tomli", "Pygments", ] dynamic = ["version"] From cad80c38b732c09abc657539ec9af2ec7af4000a Mon Sep 17 00:00:00 2001 From: James Addison Date: Mon, 26 Aug 2024 23:45:27 +0100 Subject: [PATCH 5/8] pyproject.toml: remove global language setting from `mypy` module settings --- pyproject.toml | 1 - 1 file changed, 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1f9d67c..3af8706 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,7 +71,6 @@ filterwarnings = [ ] [[tool.mypy.overrides]] -python_version = "3.8" module = [ "doc8._version", "restructuredtext_lint", From b33f3c1ce0d910cc45b5c70ac55bbdd671b783c2 Mon Sep 17 00:00:00 2001 From: James Addison Date: Mon, 26 Aug 2024 23:47:53 +0100 Subject: [PATCH 6/8] Revert "pyproject.toml: remove language-version constraint from `tomli`" This reverts commit eb47f7a69ce9b8e17b0a93d5b77047d53e734d76. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3af8706..ac5caf2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,7 +43,7 @@ dependencies = [ "docutils>=0.19,<0.21", "restructuredtext-lint>=0.7", "stevedore", - "tomli", + "tomli; python_version < '3.11'", "Pygments", ] dynamic = ["version"] From 452e60b90f233062d047ec747b69c74f4d5c1b6c Mon Sep 17 00:00:00 2001 From: James Addison Date: Mon, 26 Aug 2024 23:51:32 +0100 Subject: [PATCH 7/8] pyproject.toml: add `mypy` import-ignore for `tomli` --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index ac5caf2..7e3e131 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -75,6 +75,7 @@ module = [ "doc8._version", "restructuredtext_lint", "stevedore", + "tomli", ] ignore_missing_imports = true From e8dd61686aaf6ffff6911e269bf20298cf0d0d06 Mon Sep 17 00:00:00 2001 From: James Addison Date: Mon, 26 Aug 2024 23:53:50 +0100 Subject: [PATCH 8/8] lint: ignore `mypy` redifinition error --- src/doc8/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc8/main.py b/src/doc8/main.py index 9206470..4cae8c4 100644 --- a/src/doc8/main.py +++ b/src/doc8/main.py @@ -41,7 +41,7 @@ from tomllib import load as toml_load # type: ignore except ImportError: # py3.10 or older - from tomli import load as toml_load + from tomli import load as toml_load # type: ignore[no-redef] from stevedore import extension