From 9e57145aa44620f369efde35d507483e381780a9 Mon Sep 17 00:00:00 2001 From: "repo-helper[bot]" <74742576+repo-helper[bot]@users.noreply.github.com> Date: Tue, 20 Jan 2026 12:45:20 +0000 Subject: [PATCH] Updated files with 'repo_helper'. --- .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 +++----- .gitignore | 1 - .pre-commit-config.yaml | 11 ++++++----- .style.yapf | 2 +- README.rst | 4 ++-- formate.toml | 21 +++++++-------------- justfile | 3 +++ tox.ini | 6 ++++-- 13 files changed, 46 insertions(+), 51 deletions(-) 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 7048404..393dab4 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 7ef4422..c047b4b 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 80bee22..81f4a7f 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 }} @@ -82,6 +80,9 @@ jobs: Coverage: needs: tests + permissions: + actions: write + contents: read runs-on: "ubuntu-22.04" steps: - name: Checkout 🛎️ @@ -131,7 +132,10 @@ jobs: Deploy: needs: tests - + permissions: + actions: write + issues: write + contents: read runs-on: "ubuntu-22.04" steps: - name: Checkout 🛎️ @@ -162,7 +166,7 @@ jobs: with: user: __token__ password: ${{ secrets.PYPI_TOKEN }} - skip_existing: true + skip-existing: true - name: Close milestone 🚪 if: startsWith(github.ref, 'refs/tags/') diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index 90b96e3..d0a745f 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/.gitignore b/.gitignore index 5de85dd..5088365 100644 --- a/.gitignore +++ b/.gitignore @@ -47,7 +47,6 @@ docs/_build/ doc/build target/ .ipynb_checkpoints -.python-version celerybeat-schedule celerybeat.pid *.sage.py diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5bf6069..c414868 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,7 +8,7 @@ ci: repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.13.0 + rev: v0.14.0 hooks: - id: reformat-pyproject @@ -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 5e13444..ea2bfad 100644 --- a/README.rst +++ b/README.rst @@ -89,11 +89,11 @@ formate-black :target: https://github.com/python-formate/formate-black/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/formate-black - :target: https://pypi.org/project/formate-black/ + :target: https://pypistats.org/packages/formate-black :alt: PyPI - Downloads .. end shields diff --git a/formate.toml b/formate.toml index a9042e1..c8c6c4d 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,20 +34,6 @@ lines_between_types = 0 use_parentheses = true remove_redundant_aliases = true default_section = "THIRDPARTY" -known_third_party = [ - "black", - "coincidence", - "coverage", - "coverage_pyver_pragma", - "domdf_python_tools", - "formate", - "importlib_metadata", - "parameterized", - "pytest", - "pytest_cov", - "pytest_randomly", - "pytest_timeout", -] known_first_party = [ "formate_black",] [config] diff --git a/justfile b/justfile index e8ed871..9cd8b78 100644 --- a/justfile +++ b/justfile @@ -12,6 +12,9 @@ unused-imports: incomplete-defs: tox -e lint -- --select MAN +commas: + 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 29a6566..3d83917 100644 --- a/tox.ini +++ b/tox.ini @@ -93,7 +93,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 @@ -101,6 +101,9 @@ deps = flake8-sphinx-links>=0.0.4 flake8-strftime>=0.1.1 flake8-typing-imports>=1.10.0 + flake8-params>=0.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 @@ -108,7 +111,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 formate_black tests --allow-toolbox {posargs} [testenv:perflint]