From 3d0fd13f13ff04d4bfc2f98010bbbfd1d08c8454 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 2 Jan 2025 19:12:26 +0300 Subject: [PATCH 1/7] Update pre-commit hooks --- .pre-commit-config.yaml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4b54702a9..6624e2ddf 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,8 @@ repos: + - repo: meta + hooks: + - id: check-hooks-apply + - id: check-useless-excludes - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: @@ -19,6 +23,10 @@ repos: rev: v1.7.5 hooks: - id: actionlint + - repo: https://github.com/woodruffw/zizmor-pre-commit + rev: v0.8.0 + hooks: + - id: zizmor - repo: https://github.com/shellcheck-py/shellcheck-py rev: v0.10.0.1 hooks: @@ -33,6 +41,13 @@ repos: - id: ruff args: ["--exit-non-zero-on-fix", "--fix"] - id: ruff-format + - repo: https://github.com/sphinx-contrib/sphinx-lint + rev: v1.0.0 + hooks: + - id: sphinx-lint + args: [--enable=default-role] + files: ^docs/ + exclude: ^(tests/fixtures/|tests/test_formatter/__snapshots__/) ci: autofix_commit_msg: "[pre-commit.ci] auto fixes from pre-commit.com hooks" From be4d735e5cc2012a771ecfc23d9b9ddff3ab988d Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 2 Jan 2025 19:16:36 +0300 Subject: [PATCH 2/7] Fix found problems --- .github/workflows/test.yml | 4 ++++ .pre-commit-config.yaml | 10 ++++++---- docs/pages/curry.rst | 4 ++-- docs/pages/future.rst | 2 +- docs/pages/result.rst | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ad4dd426e..7e85ea7c3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -24,6 +24,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + persist-credentials: false - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 @@ -78,6 +80,8 @@ jobs: steps: - uses: actions/checkout@v4 + with: + persist-credentials: false - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6624e2ddf..8da58d3a6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,8 +1,4 @@ repos: - - repo: meta - hooks: - - id: check-hooks-apply - - id: check-useless-excludes - repo: https://github.com/pre-commit/pre-commit-hooks rev: v5.0.0 hooks: @@ -48,6 +44,12 @@ repos: args: [--enable=default-role] files: ^docs/ + # Should be the last: + - repo: meta + hooks: + - id: check-hooks-apply + - id: check-useless-excludes + exclude: ^(tests/fixtures/|tests/test_formatter/__snapshots__/) ci: autofix_commit_msg: "[pre-commit.ci] auto fixes from pre-commit.com hooks" diff --git a/docs/pages/curry.rst b/docs/pages/curry.rst index 8661f3df0..ac8ee62b0 100644 --- a/docs/pages/curry.rst +++ b/docs/pages/curry.rst @@ -255,8 +255,8 @@ See ``Limitations`` in the API Reference. FAQ --- -Why don't you support `*` and `**` arguments? -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Why don't you support ``*`` and ``**`` arguments? +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When you use ``partial(some, *my_args)`` or ``partial(some, **my_args)`` or both of them at the same time, diff --git a/docs/pages/future.rst b/docs/pages/future.rst index 0eb3662da..599955d69 100644 --- a/docs/pages/future.rst +++ b/docs/pages/future.rst @@ -12,7 +12,7 @@ What problems do we solve with these containers? Basically these ones: 1. You cannot call async function from a sync one 2. Any unexpectedly thrown exception can ruin your whole event loop -3. Ugly composition with lots of `await` statements +3. Ugly composition with lots of ``await`` statements Future container diff --git a/docs/pages/result.rst b/docs/pages/result.rst index 5745044d6..7d6ddcdd6 100644 --- a/docs/pages/result.rst +++ b/docs/pages/result.rst @@ -99,7 +99,7 @@ use :func:`future_safe ` instead. >>> str(divide(0)) '' -If you want to `safe` handle only a set of exceptions: +If you want ``@safe`` to handle only a set of exceptions: .. code:: python From 03394ddfe9d9536451efcfbff23282fd75edd422 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 2 Jan 2025 19:17:27 +0300 Subject: [PATCH 3/7] Fix found problems --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 8da58d3a6..4637f8329 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -50,7 +50,6 @@ repos: - id: check-hooks-apply - id: check-useless-excludes -exclude: ^(tests/fixtures/|tests/test_formatter/__snapshots__/) ci: autofix_commit_msg: "[pre-commit.ci] auto fixes from pre-commit.com hooks" autofix_prs: true From 05c94c29176054bcf8aaa1bf8bf46a5bdc9c1cb3 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 2 Jan 2025 19:21:36 +0300 Subject: [PATCH 4/7] Fix found problems --- .pre-commit-config.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 4637f8329..b43415d46 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -27,6 +27,7 @@ repos: rev: v0.10.0.1 hooks: - id: shellcheck + always_run: true - repo: https://github.com/tox-dev/pyproject-fmt rev: v2.5.0 hooks: From 275eed019b19fa551f767956260b50b780e95eba Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 2 Jan 2025 19:23:01 +0300 Subject: [PATCH 5/7] Fix found problems --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b43415d46..6a285c77f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,9 +25,9 @@ repos: - id: zizmor - repo: https://github.com/shellcheck-py/shellcheck-py rev: v0.10.0.1 + always_run: true hooks: - id: shellcheck - always_run: true - repo: https://github.com/tox-dev/pyproject-fmt rev: v2.5.0 hooks: From 76817df6257013febaf46065b566f97ce0acf6a9 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 2 Jan 2025 19:26:00 +0300 Subject: [PATCH 6/7] Fix found problems --- .pre-commit-config.yaml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6a285c77f..89c3485ff 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,11 +23,6 @@ repos: rev: v0.8.0 hooks: - id: zizmor - - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.10.0.1 - always_run: true - hooks: - - id: shellcheck - repo: https://github.com/tox-dev/pyproject-fmt rev: v2.5.0 hooks: From 8fb7c4f10940d32f4031d460f97e981bc7044e85 Mon Sep 17 00:00:00 2001 From: sobolevn Date: Thu, 2 Jan 2025 19:26:25 +0300 Subject: [PATCH 7/7] Fix found problems --- .pre-commit-config.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 89c3485ff..193bf6cfc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,6 +23,10 @@ repos: rev: v0.8.0 hooks: - id: zizmor + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.10.0.1 + hooks: + - id: shellcheck - repo: https://github.com/tox-dev/pyproject-fmt rev: v2.5.0 hooks: @@ -43,7 +47,6 @@ repos: # Should be the last: - repo: meta hooks: - - id: check-hooks-apply - id: check-useless-excludes ci: