From 729eafde3106901e7be7b341b6c7f8465aa34232 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Thu, 29 Jan 2026 13:57:03 +0000 Subject: [PATCH 1/2] Updated files with 'repo_helper'. --- .github/workflows/conda_ci.yml | 5 ++--- .github/workflows/docs_test_action.yml | 5 ++--- .github/workflows/flake8.yml | 5 ++--- .github/workflows/mypy.yml | 5 ++--- .github/workflows/octocheese.yml | 7 +++---- .github/workflows/python_ci.yml | 8 +++----- .github/workflows/python_ci_linux.yml | 18 +++++++++++------ .github/workflows/python_ci_macos.yml | 8 +++----- .pre-commit-config.yaml | 9 +++++---- .style.yapf | 2 +- README.rst | 24 +++++++++++------------ doc-source/index.rst | 12 ++++++------ doc-source/license.rst | 2 +- formate.toml | 27 +++++++------------------- justfile | 2 +- pyproject.toml | 2 +- tox.ini | 8 ++++---- 17 files changed, 67 insertions(+), 82 deletions(-) diff --git a/.github/workflows/conda_ci.yml b/.github/workflows/conda_ci.yml index c898c90..476b023 100644 --- a/.github/workflows/conda_ci.yml +++ b/.github/workflows/conda_ci.yml @@ -6,12 +6,11 @@ on: push: branches: ["master"] -permissions: - contents: read - jobs: tests: name: "Conda" + permissions: + contents: read runs-on: ubuntu-22.04 defaults: run: diff --git a/.github/workflows/docs_test_action.yml b/.github/workflows/docs_test_action.yml index 81c4025..dc03fd3 100644 --- a/.github/workflows/docs_test_action.yml +++ b/.github/workflows/docs_test_action.yml @@ -9,11 +9,10 @@ on: - 'imgbot' pull_request: -permissions: - contents: read - jobs: docs: + permissions: + contents: read runs-on: ubuntu-latest steps: - name: Checkout 🛎️ diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 5e67c5c..1ecb7b9 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -10,12 +10,11 @@ on: - 'imgbot' pull_request: -permissions: - contents: read - jobs: Run: name: "Flake8" + permissions: + contents: read runs-on: "ubuntu-22.04" steps: diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 4c22a52..b889816 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -10,11 +10,10 @@ on: - 'imgbot' pull_request: -permissions: - contents: read - jobs: Run: + permissions: + contents: read name: "mypy / ${{ matrix.os }}" runs-on: ${{ matrix.os }} diff --git a/.github/workflows/octocheese.yml b/.github/workflows/octocheese.yml index 7247bc6..d207313 100644 --- a/.github/workflows/octocheese.yml +++ b/.github/workflows/octocheese.yml @@ -6,16 +6,15 @@ on: schedule: - cron: 0 12 * * * -permissions: - contents: write - jobs: Run: + permissions: + contents: write runs-on: ubuntu-latest steps: - uses: domdfcoding/octocheese@master with: - pypi_name: "default_values" + pypi_name: "default-values" env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} if: startsWith(github.ref, 'refs/tags/') != true diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 651112e..8e8e831 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -11,13 +11,11 @@ on: pull_request: -permissions: - actions: write - issues: write - contents: read - jobs: tests: + permissions: + actions: write + contents: read name: "windows-2022 / Python ${{ matrix.config.python-version }}" runs-on: "windows-2022" continue-on-error: ${{ matrix.config.experimental }} diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 53b3e22..c45564a 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -12,13 +12,11 @@ on: - '*' pull_request: -permissions: - actions: write - issues: write - contents: read - jobs: tests: + permissions: + actions: write + contents: read name: "ubuntu-22.04 / Python ${{ matrix.config.python-version }}" runs-on: "ubuntu-22.04" continue-on-error: ${{ matrix.config.experimental }} @@ -85,6 +83,9 @@ jobs: Coverage: needs: tests + permissions: + actions: write + contents: read runs-on: "ubuntu-22.04" steps: - name: Checkout 🛎️ @@ -134,7 +135,10 @@ jobs: Deploy: needs: tests - + permissions: + actions: write + issues: write + contents: read runs-on: "ubuntu-22.04" steps: - name: Checkout 🛎️ @@ -179,6 +183,8 @@ jobs: Conda: needs: deploy + permissions: + contents: read runs-on: ubuntu-22.04 if: startsWith(github.ref, 'refs/tags/') || (startsWith(github.event.head_commit.message, 'Bump version') != true) steps: diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index d712e98..f132901 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -11,13 +11,11 @@ on: pull_request: -permissions: - actions: write - issues: write - contents: read - jobs: tests: + permissions: + actions: write + contents: read name: "macos-${{ matrix.config.os-ver }} / Python ${{ matrix.config.python-version }}" runs-on: "macos-${{ matrix.config.os-ver }}" continue-on-error: ${{ matrix.config.experimental }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5339bdc..de735a4 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -18,7 +18,6 @@ repos: - id: check-added-large-files - id: check-ast - id: fix-byte-order-marker - - id: check-byte-order-marker - id: check-case-conflict - id: check-executables-have-shebangs - id: check-json @@ -33,7 +32,7 @@ repos: - id: end-of-file-fixer - repo: https://github.com/domdfcoding/pre-commit-hooks - rev: v0.4.0 + rev: v0.5.0 hooks: - id: requirements-txt-sorter args: @@ -81,13 +80,15 @@ repos: - id: snippet-fmt - repo: https://github.com/python-formate/formate - rev: v0.8.0 + rev: v1.1.2 hooks: - id: formate exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ + additional_dependencies: + - formate-trailing-commas>=0.1.1 - repo: https://github.com/python-coincidence/dep_checker - rev: v0.8.0 + rev: v0.9.0 hooks: - id: dep_checker args: diff --git a/.style.yapf b/.style.yapf index e64be7c..9378f04 100644 --- a/.style.yapf +++ b/.style.yapf @@ -312,7 +312,7 @@ split_before_dict_set_generator=True # # foo = ('This is a really long string: {}, {}, {}, {}' # .format(a, b, c, d)) -split_before_dot=False +split_before_dot=True # Split after the opening paren which surrounds an expression if it doesn't # fit on a single line. diff --git a/README.rst b/README.rst index d0cdd40..73937a3 100644 --- a/README.rst +++ b/README.rst @@ -86,20 +86,20 @@ For more information see `the documentation =0.1.1 flake8-encodings>=0.1.0 flake8-github-actions>=0.1.0 - flake8-noqa>=1.1.0,<=1.2.2 + git+https://github.com/python-formate/flake8-noqa.git@v1.2.2-python-formate.0 flake8-pyi>=20.10.0,<=22.8.0 flake8-pytest-style>=1.3.0,<2 flake8-quotes>=3.3.0 @@ -110,7 +110,8 @@ deps = flake8-strftime>=0.1.1 flake8-typing-imports>=1.10.0 flake8-params>=0.1.0 - flake8-commas>=2.1.0 + flake8-unused-fstrings>=2.0.0 + git+https://github.com/python-formate/flake8-commas.git@4.0.0-python-formate.0 git+https://github.com/domdfcoding/restructuredtext-lint.git@fix-deprecations git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git git+https://github.com/domdfcoding/flake8-rst-docstrings.git @@ -118,7 +119,6 @@ deps = git+https://github.com/python-formate/flake8-missing-annotations.git git+https://github.com/domdfcoding/pydocstyle.git@stub-functions pygments>=2.7.1 - importlib_metadata<4.5.0; python_version<'3.8' commands = python3 -m flake8_rst_docstrings_sphinx sphinxcontrib/default_values tests --allow-toolbox {posargs} [testenv:perflint] @@ -168,7 +168,7 @@ commands = [flake8] max-line-length = 120 -select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E303 E304 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 ENC001 ENC002 ENC003 ENC004 ENC011 ENC012 ENC021 ENC022 ENC023 ENC024 ENC025 ENC026 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 NQA001 NQA002 NQA003 NQA004 NQA005 NQA102 NQA103 C818 C819 E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002 PRM001 PRM002 PRM003 +select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E303 E304 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 NUF001 PT001 PT002 PT003 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 ENC001 ENC002 ENC003 ENC004 ENC011 ENC012 ENC021 ENC022 ENC023 ENC024 ENC025 ENC026 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 NQA001 NQA002 NQA003 NQA004 NQA005 NQA102 NQA103 C818 C819 E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002 PRM001 PRM002 PRM003 extend-exclude = doc-source,old,build,dist,__pkginfo__.py,setup.py,venv rst-directives = TODO From f6139ea9837727f592bb4620f808c88491713197 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 29 Jan 2026 13:57:19 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- sphinxcontrib/default_values/__init__.py | 3 ++- tests/test_format_default_value.py | 2 +- tests/test_process_default_format.py | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sphinxcontrib/default_values/__init__.py b/sphinxcontrib/default_values/__init__.py index c63e94d..743b52f 100644 --- a/sphinxcontrib/default_values/__init__.py +++ b/sphinxcontrib/default_values/__init__.py @@ -225,7 +225,8 @@ def process_docstring( lines.insert( insert_index + 1 + idx, - f"{a_tab}{default_description_format % formatted_annotation}".rstrip('.') + '.' + f"{a_tab}{default_description_format % formatted_annotation}".rstrip('.') + + '.', ) break diff --git a/tests/test_format_default_value.py b/tests/test_format_default_value.py index 9cc850c..9669955 100644 --- a/tests/test_format_default_value.py +++ b/tests/test_format_default_value.py @@ -38,7 +38,7 @@ (inspect.Signature.empty, None), (re.compile(".*"), "``re.compile('.*')``"), (re.compile(".*", flags=re.ASCII), "``re.compile('.*', re.ASCII)``"), - ] + ], ) def test_format_default_value(value, expects): assert format_default_value(value) == expects diff --git a/tests/test_process_default_format.py b/tests/test_process_default_format.py index bc49e91..506d8ab 100644 --- a/tests/test_process_default_format.py +++ b/tests/test_process_default_format.py @@ -39,7 +39,7 @@ def __init__(self, format_): ("The default value is\t", "The default value is\t%s"), ("The default value is ", "The default value is %s"), ("%s is the default value", "%s is the default value"), - ] + ], ) def test_process_default_format(value, expects): app = MockApp(value)