From f2533d0ac5b6aa7eb7e25d4fde5e6397fbf7c7fb Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Wed, 14 Jan 2026 22:24:33 +0000 Subject: [PATCH] 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 | 5 ++--- .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 | 4 ++-- doc-source/index.rst | 2 +- formate.toml | 26 +++++++------------------- justfile | 2 +- tox.ini | 8 ++++---- 15 files changed, 49 insertions(+), 63 deletions(-) diff --git a/.github/workflows/conda_ci.yml b/.github/workflows/conda_ci.yml index a020b4d..89f3e89 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 afa2c65..0930243 100644 --- a/.github/workflows/octocheese.yml +++ b/.github/workflows/octocheese.yml @@ -6,11 +6,10 @@ on: schedule: - cron: 0 12 * * * -permissions: - contents: write - jobs: Run: + permissions: + contents: write runs-on: ubuntu-latest steps: - uses: domdfcoding/octocheese@master diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index c740aeb..05cc08a 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 4563219..22aacfa 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 effd826..83e76f7 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 131442c..018437f 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.1 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 fcac688..632c49c 100644 --- a/README.rst +++ b/README.rst @@ -109,11 +109,11 @@ flake8-dunder-all :target: https://github.com/python-formate/flake8-dunder-all/commit/master :alt: GitHub last commit -.. |maintained| image:: https://img.shields.io/maintenance/yes/2025 +.. |maintained| image:: https://img.shields.io/maintenance/yes/2026 :alt: Maintenance .. |pypi-downloads| image:: https://img.shields.io/pypi/dm/flake8-dunder-all - :target: https://pypi.org/project/flake8-dunder-all/ + :target: https://pypistats.org/packages/flake8-dunder-all :alt: PyPI - Downloads .. end shields diff --git a/doc-source/index.rst b/doc-source/index.rst index 68427b1..a035295 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -114,7 +114,7 @@ flake8-dunder-all :last-commit: :alt: GitHub last commit - .. |maintained| maintained-shield:: 2025 + .. |maintained| maintained-shield:: 2026 :alt: Maintenance .. |pypi-downloads| pypi-shield:: diff --git a/formate.toml b/formate.toml index f127306..e2da4cf 100644 --- a/formate.toml +++ b/formate.toml @@ -5,6 +5,7 @@ reformat-generics = 40 noqa-reformat = 60 ellipsis-reformat = 70 squish_stubs = 80 +newline_after_equals = 90 [hooks.yapf] priority = 30 @@ -12,6 +13,12 @@ priority = 30 [hooks.yapf.kwargs] yapf_style = ".style.yapf" +[hooks.trailing_commas] +priority = 21 + +[hooks.trailing_commas.kwargs] +format_ImportFrom = false + [hooks.isort] priority = 50 @@ -27,25 +34,6 @@ lines_between_types = 0 use_parentheses = true remove_redundant_aliases = true default_section = "THIRDPARTY" -known_third_party = [ - "astatine", - "click", - "coincidence", - "consolekit", - "coverage", - "coverage_pyver_pragma", - "domdf_python_tools", - "flake8", - "github", - "importlib_metadata", - "natsort", - "pytest", - "pytest_cov", - "pytest_randomly", - "pytest_rerunfailures", - "pytest_timeout", - "requests", -] known_first_party = [ "flake8_dunder_all",] [config] diff --git a/justfile b/justfile index 6a4d335..9cd8b78 100644 --- a/justfile +++ b/justfile @@ -13,7 +13,7 @@ incomplete-defs: tox -e lint -- --select MAN commas: - tox -e lint -- --select C812,C813,C814,C815,C816 + tox -e lint -- --select C810,C812,C813,C814,C815,C816 vdiff: git diff $(repo-helper show version -q)..HEAD diff --git a/tox.ini b/tox.ini index c271e8d..a729501 100644 --- a/tox.ini +++ b/tox.ini @@ -129,7 +129,7 @@ deps = flake8-dunder-all>=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 @@ -138,7 +138,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 @@ -146,7 +147,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 flake8_dunder_all tests --allow-toolbox {posargs} [testenv:perflint] @@ -196,7 +196,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