diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 1260bb1..804ec4a 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,13 +1,14 @@ [bumpversion] -current_version = 0.2.0 +current_version = 0.2.2.post1 commit = True tag = True [bumpversion:file:pyproject.toml] -[bumpversion:file:repo_helper.yml] +search = version = "{current_version}" +replace = version = "{new_version}" -[bumpversion:file:__pkginfo__.py] +[bumpversion:file:repo_helper.yml] [bumpversion:file:README.rst] diff --git a/.dependabot/config.yml b/.dependabot/config.yml deleted file mode 100644 index 4584924..0000000 --- a/.dependabot/config.yml +++ /dev/null @@ -1,9 +0,0 @@ -# This file is managed by 'repo_helper'. Don't edit it directly. ---- -version: 1 -update_configs: -- package_manager: python - directory: / - update_schedule: weekly - default_reviewers: - - domdfcoding diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 8a8932a..cd57828 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -44,7 +44,7 @@ If possible, please include a small, self-contained reproduction. * sphinx-debuginfo: ## Installation source - + ## Other Additional Information: diff --git a/.github/dependabot.yml b/.github/dependabot.yml index e769ad3..454225a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -6,5 +6,6 @@ updates: directory: / schedule: interval: weekly + open-pull-requests-limit: 0 reviewers: - domdfcoding diff --git a/.github/milestones.py b/.github/milestones.py new file mode 100755 index 0000000..5e868dc --- /dev/null +++ b/.github/milestones.py @@ -0,0 +1,28 @@ +#!/usr/bin/env python + +# stdlib +import os +import sys + +# 3rd party +from github3 import GitHub +from github3.repos import Repository +from packaging.version import InvalidVersion, Version + +latest_tag = os.environ["GITHUB_REF_NAME"] + +try: + current_version = Version(latest_tag) +except InvalidVersion: + sys.exit() + +gh: GitHub = GitHub(token=os.environ["GITHUB_TOKEN"]) +repo: Repository = gh.repository(*os.environ["GITHUB_REPOSITORY"].split('/', 1)) + +for milestone in repo.milestones(state="open"): + try: + milestone_version = Version(milestone.title) + except InvalidVersion: + continue + if milestone_version == current_version: + sys.exit(not milestone.update(state="closed")) diff --git a/.github/stale.yml b/.github/stale.yml index bb7ca3f..bb7fa62 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -7,7 +7,7 @@ daysUntilStale: 180 # Number of days of inactivity before an Issue or Pull Request with the stale label is closed. # Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 180 +daysUntilClose: false # Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) onlyLabels: [] @@ -28,13 +28,13 @@ exemptMilestones: false exemptAssignees: false # Label to use when marking as stale -staleLabel: wontfix +staleLabel: stale # Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. +markComment: false +# This issue has been automatically marked as stale because it has not had +# recent activity. It will be closed if no further activity occurs. Thank you +# for your contributions. # Comment to post when removing the stale label. # unmarkComment: > diff --git a/.github/workflows/cleanup.yml b/.github/workflows/cleanup.yml deleted file mode 100644 index 741c0bd..0000000 --- a/.github/workflows/cleanup.yml +++ /dev/null @@ -1,14 +0,0 @@ -# This file is managed by 'repo_helper'. Don't edit it directly. ---- -name: Artefact Cleaner -on: - schedule: - - cron: 0 9 1 * * -jobs: - Clean: - runs-on: ubuntu-latest - steps: - - name: cleanup - uses: glassechidna/artifact-cleaner@v2 - with: - minimumAge: 1000000.0 diff --git a/.github/workflows/conda_ci.yml b/.github/workflows/conda_ci.yml deleted file mode 100644 index a352c9e..0000000 --- a/.github/workflows/conda_ci.yml +++ /dev/null @@ -1,44 +0,0 @@ -# This file is managed by 'repo_helper'. Don't edit it directly. ---- -name: Conda Tests - -on: - push: - pull_request: - branches: ["master"] - -jobs: - tests: - name: "Conda" - runs-on: ubuntu-latest - - steps: - - name: Checkout 🛎️ - uses: "actions/checkout@v2" - - - name: Setup Python 🐍 - uses: "actions/setup-python@v2" - with: - python-version: "3.8" - - - name: Install dependencies 🔧 - run: | - python -VV - python -m site - python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade repo_helper - # $CONDA is an environment variable pointing to the root of the miniconda directory - $CONDA/bin/conda update -q conda - $CONDA/bin/conda install conda-build=3.21.0 - - $CONDA/bin/conda config --add channels conda-forge - $CONDA/bin/conda config --add channels domdfcoding - - - name: "Build and install package" - run: | - # This mess is only necessary because conda won't fix it themselves - # https://github.com/conda/conda/issues/1884 - - python -m repo_helper build --conda --out-dir conda-bld/noarch - $CONDA/bin/conda index ./conda-bld || exit 1 - $CONDA/bin/conda install -c file://$(pwd)/conda-bld sphinx-debuginfo -y || exit 1 diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 29303d6..5e67c5c 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -4,27 +4,47 @@ name: Flake8 on: push: + branches-ignore: + - 'repo-helper-update' + - 'pre-commit-ci-update-config' + - 'imgbot' + pull_request: + +permissions: + contents: read jobs: Run: name: "Flake8" - runs-on: "ubuntu-18.04" + runs-on: "ubuntu-22.04" steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" + + - name: Check for changed files + uses: dorny/paths-filter@v2 + id: changes + with: + list-files: "json" + filters: | + code: + - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)' - name: Setup Python 🐍 - uses: "actions/setup-python@v2" + if: steps.changes.outputs.code == 'true' + uses: "actions/setup-python@v5" with: - python-version: "3.8" + python-version: "3.9" - name: Install dependencies 🔧 + if: steps.changes.outputs.code == 'true' run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install tox + python -m pip install tox~=3.0 - name: "Run Flake8" - run: "python -m tox -e lint -- --format github" + if: steps.changes.outputs.code == 'true' + run: "python -m tox -e lint -s false -- --format github" diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index e10cf9b..4c22a52 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -4,6 +4,14 @@ name: mypy on: push: + branches-ignore: + - 'repo-helper-update' + - 'pre-commit-ci-update-config' + - 'imgbot' + pull_request: + +permissions: + contents: read jobs: Run: @@ -12,24 +20,35 @@ jobs: strategy: matrix: - os: ['ubuntu-20.04', 'windows-2019'] + os: ['ubuntu-22.04', 'windows-2022'] fail-fast: false steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" + + - name: Check for changed files + uses: dorny/paths-filter@v2 + id: changes + with: + list-files: "json" + filters: | + code: + - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)' - name: Setup Python 🐍 - uses: "actions/setup-python@v2" + if: steps.changes.outputs.code == 'true' + uses: "actions/setup-python@v5" with: - python-version: "3.6" + python-version: "3.9" - name: Install dependencies 🔧 run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv + python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0 - name: "Run mypy" - run: "python -m tox -e mypy" + if: steps.changes.outputs.code == 'true' + run: "python -m tox -e mypy -s false" diff --git a/.github/workflows/octocheese.yml b/.github/workflows/octocheese.yml index a1c6a95..2eb87c5 100644 --- a/.github/workflows/octocheese.yml +++ b/.github/workflows/octocheese.yml @@ -3,10 +3,8 @@ name: "GitHub Releases" on: - push: - branches: ["master"] schedule: - - cron: 0 12 * * 2,4,6 + - cron: 0 12 * * * jobs: Run: diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index fd2d483..60eebbf 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -4,46 +4,78 @@ name: Windows on: push: + branches-ignore: + - 'repo-helper-update' + - 'pre-commit-ci-update-config' + - 'imgbot' + + pull_request: + +permissions: + actions: write + issues: write + contents: read jobs: tests: - name: "windows-2019 / Python ${{ matrix.config.python-version }}" - runs-on: "windows-2019" + name: "windows-2022 / Python ${{ matrix.config.python-version }}" + runs-on: "windows-2022" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9' + USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13,pypy-3.7,pypy-3.8,pypy-3.9' strategy: fail-fast: False matrix: config: - - {python-version: "3.6", testenvs: "py36,build", experimental: False} - {python-version: "3.7", testenvs: "py37,build", experimental: False} - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} + - {python-version: "3.10", testenvs: "py310,build", experimental: False} + - {python-version: "3.11", testenvs: "py311,build", experimental: False} + - {python-version: "3.12", testenvs: "py312,build", experimental: False} + - {python-version: "3.13", testenvs: "py313,build", experimental: False} + - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: False} + - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: False} + - {python-version: "pypy-3.9-v7.3.15", testenvs: "pypy39,build", experimental: True} steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" + + - name: Check for changed files + if: startsWith(github.ref, 'refs/tags/') != true + uses: dorny/paths-filter@v2 + id: changes + with: + list-files: "json" + filters: | + code: + - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)' - name: Setup Python 🐍 - uses: "actions/setup-python@v2" + id: setup-python + if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.config.python-version }}" - name: Install dependencies 🔧 + if: steps.setup-python.outcome == 'success' run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv + python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0 - name: "Run Tests for Python ${{ matrix.config.python-version }}" - run: python -m tox -e "${{ matrix.config.testenvs }}" + if: steps.setup-python.outcome == 'success' + run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v2 - if: ${{ always() }} + uses: actions/upload-artifact@v4 + if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" path: .coverage + include-hidden-files: true diff --git a/.github/workflows/python_ci_linux.yml b/.github/workflows/python_ci_linux.yml index 1e9be36..eef19bf 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -4,61 +4,94 @@ name: Linux on: push: + branches-ignore: + - 'repo-helper-update' + - 'pre-commit-ci-update-config' + - 'imgbot' + tags: + - '*' + pull_request: + +permissions: + actions: write + issues: write + contents: read jobs: tests: - name: "ubuntu-20.04 / Python ${{ matrix.config.python-version }}" - runs-on: "ubuntu-20.04" + name: "ubuntu-22.04 / Python ${{ matrix.config.python-version }}" + runs-on: "ubuntu-22.04" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9' + USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13,pypy-3.7,pypy-3.8,pypy-3.9' strategy: fail-fast: False matrix: config: - - {python-version: "3.6", testenvs: "py36,build", experimental: False} - {python-version: "3.7", testenvs: "py37,build", experimental: False} - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} + - {python-version: "3.10", testenvs: "py310,build", experimental: False} + - {python-version: "3.11", testenvs: "py311,build", experimental: False} + - {python-version: "3.12", testenvs: "py312,build", experimental: False} + - {python-version: "3.13", testenvs: "py313,build", experimental: False} + - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: False} + - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: False} + - {python-version: "pypy-3.9", testenvs: "pypy39,build", experimental: True} steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" + + - name: Check for changed files + if: startsWith(github.ref, 'refs/tags/') != true + uses: dorny/paths-filter@v2 + id: changes + with: + list-files: "json" + filters: | + code: + - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)' - name: Setup Python 🐍 - uses: "actions/setup-python@v2" + id: setup-python + if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.config.python-version }}" - name: Install dependencies 🔧 + if: steps.setup-python.outcome == 'success' run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv + python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0 python -m pip install --upgrade coverage_pyver_pragma - name: "Run Tests for Python ${{ matrix.config.python-version }}" - run: python -m tox -e "${{ matrix.config.testenvs }}" + if: steps.setup-python.outcome == 'success' + run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v2 - if: ${{ always() }} + uses: actions/upload-artifact@v4 + if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" path: .coverage + include-hidden-files: true Coverage: needs: tests - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" - name: Setup Python 🐍 - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v5" with: python-version: 3.8 @@ -68,26 +101,32 @@ jobs: python -m pip install --upgrade "coveralls>=3.0.0" coverage_pyver_pragma - name: "Download Coverage 🪂" - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v4 with: path: coverage - name: Display structure of downloaded files + id: show run: ls -R working-directory: coverage + continue-on-error: true - name: Combine Coverage 👷 + if: ${{ steps.show.outcome != 'failure' }} run: | shopt -s globstar python -m coverage combine coverage/**/.coverage - name: "Upload Combined Coverage Artefact 🚀" - uses: actions/upload-artifact@v2 + if: ${{ steps.show.outcome != 'failure' }} + uses: actions/upload-artifact@v4 with: name: "combined-coverage" path: .coverage + include-hidden-files: true - name: "Upload Combined Coverage to Coveralls" + if: ${{ steps.show.outcome != 'failure' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -96,29 +135,29 @@ jobs: Deploy: needs: tests - runs-on: "ubuntu-20.04" + runs-on: "ubuntu-22.04" steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" if: startsWith(github.ref, 'refs/tags/') - name: Setup Python 🐍 - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v5" + if: startsWith(github.ref, 'refs/tags/') with: python-version: 3.8 - if: startsWith(github.ref, 'refs/tags/') - name: Install dependencies 🔧 + if: startsWith(github.ref, 'refs/tags/') run: | python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox - if: startsWith(github.ref, 'refs/tags/') + python -m pip install --upgrade tox~=3.0 - name: Build distributions 📦 + if: startsWith(github.ref, 'refs/tags/') run: | tox -e build - if: startsWith(github.ref, 'refs/tags/') - name: Upload distribution to PyPI 🚀 if: startsWith(github.ref, 'refs/tags/') @@ -127,3 +166,11 @@ jobs: user: __token__ password: ${{ secrets.PYPI_TOKEN }} skip_existing: true + + - name: Close milestone 🚪 + if: startsWith(github.ref, 'refs/tags/') + run: | + python -m pip install --upgrade github3.py packaging + python .github/milestones.py + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/python_ci_macos.yml b/.github/workflows/python_ci_macos.yml index a0bb81e..9ced940 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -4,46 +4,78 @@ name: macOS on: push: + branches-ignore: + - 'repo-helper-update' + - 'pre-commit-ci-update-config' + - 'imgbot' + + pull_request: + +permissions: + actions: write + issues: write + contents: read jobs: tests: - name: "macos-latest / Python ${{ matrix.config.python-version }}" - runs-on: "macos-latest" + name: "macos-${{ matrix.config.os-ver }} / Python ${{ matrix.config.python-version }}" + runs-on: "macos-${{ matrix.config.os-ver }}" continue-on-error: ${{ matrix.config.experimental }} env: - USING_COVERAGE: '3.6,3.7,3.8,3.9' + USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13,pypy-3.7,pypy-3.8,pypy-3.9' strategy: fail-fast: False matrix: config: - - {python-version: "3.6", testenvs: "py36,build", experimental: False} - - {python-version: "3.7", testenvs: "py37,build", experimental: False} - - {python-version: "3.8", testenvs: "py38,build", experimental: False} - - {python-version: "3.9", testenvs: "py39,build", experimental: False} + - {python-version: "3.7", os-ver: "13", testenvs: "py37,build", experimental: False} + - {python-version: "3.8", os-ver: "14", testenvs: "py38,build", experimental: False} + - {python-version: "3.9", os-ver: "14", testenvs: "py39,build", experimental: False} + - {python-version: "3.10", os-ver: "14", testenvs: "py310,build", experimental: False} + - {python-version: "3.11", os-ver: "14", testenvs: "py311,build", experimental: False} + - {python-version: "3.12", os-ver: "14", testenvs: "py312,build", experimental: False} + - {python-version: "3.13", os-ver: "14", testenvs: "py313,build", experimental: False} + - {python-version: "pypy-3.7", os-ver: "13", testenvs: "pypy37,build", experimental: False} + - {python-version: "pypy-3.8", os-ver: "14", testenvs: "pypy38,build", experimental: False} + - {python-version: "pypy-3.9", os-ver: "14", testenvs: "pypy39,build", experimental: True} steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" + + - name: Check for changed files + if: startsWith(github.ref, 'refs/tags/') != true + uses: dorny/paths-filter@v2 + id: changes + with: + list-files: "json" + filters: | + code: + - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)' - name: Setup Python 🐍 - uses: "actions/setup-python@v2" + id: setup-python + if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.config.python-version }}" - name: Install dependencies 🔧 + if: steps.setup-python.outcome == 'success' run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel - python -m pip install --upgrade tox virtualenv + python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0 - name: "Run Tests for Python ${{ matrix.config.python-version }}" - run: python -m tox -e "${{ matrix.config.testenvs }}" + if: steps.setup-python.outcome == 'success' + run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v2 - if: ${{ always() }} + uses: actions/upload-artifact@v4 + if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" path: .coverage + include-hidden-files: true diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6d01904..98f642f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -3,7 +3,15 @@ exclude: ^$ +ci: + autoupdate_schedule: quarterly + repos: + - repo: https://github.com/repo-helper/pyproject-parser + rev: v0.13.0 + hooks: + - id: reformat-pyproject + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.4.0 hooks: @@ -25,7 +33,7 @@ repos: - id: end-of-file-fixer - repo: https://github.com/domdfcoding/pre-commit-hooks - rev: v0.2.1 + rev: v0.4.0 hooks: - id: requirements-txt-sorter args: @@ -34,19 +42,19 @@ repos: exclude: ^(doc-source/conf|__pkginfo__|setup|tests/.*)\.py$ - id: bind-requirements - - repo: https://github.com/domdfcoding/flake8-dunder-all - rev: v0.1.7 + - repo: https://github.com/python-formate/flake8-dunder-all + rev: v0.4.1 hooks: - id: ensure-dunder-all files: ^sphinx_debuginfo/.*\.py$ - repo: https://github.com/domdfcoding/flake2lint - rev: v0.4.0 + rev: v0.4.3 hooks: - id: flake2lint - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.8.0 + rev: v1.10.0 hooks: - id: python-no-eval - id: rst-backticks @@ -62,19 +70,24 @@ repos: - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.1.9 + rev: v1.5.1 hooks: - id: remove-crlf - id: forbid-crlf - - repo: https://github.com/repo-helper/formate - rev: v0.4.3 + - repo: https://github.com/python-formate/snippet-fmt + rev: v0.1.5 + hooks: + - id: snippet-fmt + + - repo: https://github.com/python-formate/formate + rev: v0.8.0 hooks: - id: formate exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ - - repo: https://github.com/domdfcoding/dep_checker - rev: v0.6.2 + - repo: https://github.com/python-coincidence/dep_checker + rev: v0.8.0 hooks: - id: dep_checker args: diff --git a/.pylintrc b/.pylintrc index a21206a..81ecba0 100644 --- a/.pylintrc +++ b/.pylintrc @@ -66,7 +66,7 @@ confidence= # no Warning level messages displayed, use"--disable=all --enable=classes # --disable=W" disable=all -enable=assert-on-tuple,astroid-error,bad-except-order,bad-inline-option,bad-option-value,bad-reversed-sequence,bare-except,binary-op-exception,boolean-datetime,catching-non-exception,cell-var-from-loop,confusing-with-statement,consider-merging-isinstance,consider-using-enumerate,consider-using-ternary,continue-in-finally,cyclic-import,deprecated-pragma,django-not-available,duplicate-except,duplicate-key,eval-used,exec-used,expression-not-assigned,fatal,file-ignored,fixme,global-at-module-level,global-statement,global-variable-not-assigned,global-variable-undefined,http-response-with-content-type-json,http-response-with-json-dumps,invalid-all-object,invalid-characters-in-docstring,len-as-condition,literal-comparison,locally-disabled,locally-enabled,lost-exception,lowercase-l-suffix,misplaced-bare-raise,missing-kwoa,mixed-line-endings,model-has-unicode,model-missing-unicode,model-no-explicit-unicode,model-unicode-not-callable,multiple-imports,new-db-field-with-default,non-ascii-bytes-literals,nonexistent-operator,not-in-loop,notimplemented-raised,overlapping-except,parse-error,pointless-statement,pointless-string-statement,raising-bad-type,raising-non-exception,raw-checker-failed,redefine-in-handler,redefined-argument-from-local,redefined-builtin,redundant-content-type-for-json-response,reimported,relative-import,return-outside-function,simplifiable-if-statement,singleton-comparison,syntax-error,trailing-comma-tuple,trailing-newlines,unbalanced-tuple-unpacking,undefined-all-variable,undefined-loop-variable,unexpected-line-ending-format,unidiomatic-typecheck,unnecessary-lambda,unnecessary-pass,unnecessary-semicolon,unneeded-not,unpacking-non-sequence,unreachable,unrecognized-inline-option,used-before-assignment,useless-else-on-loop,using-constant-test,wildcard-import,yield-outside-function,useless-return +enable=assert-on-tuple,astroid-error,bad-except-order,bad-inline-option,bad-option-value,bad-reversed-sequence,bare-except,binary-op-exception,boolean-datetime,catching-non-exception,cell-var-from-loop,confusing-with-statement,consider-merging-isinstance,consider-using-enumerate,consider-using-ternary,continue-in-finally,deprecated-pragma,django-not-available,duplicate-except,duplicate-key,eval-used,exec-used,expression-not-assigned,fatal,file-ignored,fixme,global-at-module-level,global-statement,global-variable-not-assigned,global-variable-undefined,http-response-with-content-type-json,http-response-with-json-dumps,invalid-all-object,invalid-characters-in-docstring,len-as-condition,literal-comparison,locally-disabled,locally-enabled,lost-exception,lowercase-l-suffix,misplaced-bare-raise,missing-kwoa,mixed-line-endings,model-has-unicode,model-missing-unicode,model-no-explicit-unicode,model-unicode-not-callable,multiple-imports,new-db-field-with-default,non-ascii-bytes-literals,nonexistent-operator,not-in-loop,notimplemented-raised,overlapping-except,parse-error,pointless-statement,pointless-string-statement,raising-bad-type,raising-non-exception,raw-checker-failed,redefine-in-handler,redefined-argument-from-local,redefined-builtin,redundant-content-type-for-json-response,reimported,relative-import,return-outside-function,simplifiable-if-statement,singleton-comparison,syntax-error,trailing-comma-tuple,trailing-newlines,unbalanced-tuple-unpacking,undefined-all-variable,undefined-loop-variable,unexpected-line-ending-format,unidiomatic-typecheck,unnecessary-lambda,unnecessary-pass,unnecessary-semicolon,unneeded-not,unpacking-non-sequence,unreachable,unrecognized-inline-option,used-before-assignment,useless-else-on-loop,using-constant-test,wildcard-import,yield-outside-function,useless-return [REPORTS] diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 91a7a35..345eace 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -38,11 +38,11 @@ Automated tests ------------------- Tests are run with ``tox`` and ``pytest``. -To run tests for a specific Python version, such as Python 3.6: +To run tests for a specific Python version, such as Python 3.10: .. code-block:: bash - $ tox -e py36 + $ tox -e py310 To run tests for all Python versions, simply run: diff --git a/README.rst b/README.rst index a2358dc..10093e0 100644 --- a/README.rst +++ b/README.rst @@ -46,8 +46,8 @@ sphinx-debuginfo :target: https://github.com/sphinx-toolbox/sphinx-debuginfo/actions?query=workflow%3A%22mypy%22 :alt: mypy status -.. |requires| image:: https://requires.io/github/sphinx-toolbox/sphinx-debuginfo/requirements.svg?branch=master - :target: https://requires.io/github/sphinx-toolbox/sphinx-debuginfo/requirements/?branch=master +.. |requires| image:: https://dependency-dash.repo-helper.uk/github/sphinx-toolbox/sphinx-debuginfo/badge.svg + :target: https://dependency-dash.repo-helper.uk/github/sphinx-toolbox/sphinx-debuginfo/ :alt: Requirements Status .. |coveralls| image:: https://img.shields.io/coveralls/github/sphinx-toolbox/sphinx-debuginfo/master?logo=coveralls @@ -81,7 +81,7 @@ sphinx-debuginfo .. |language| image:: https://img.shields.io/github/languages/top/sphinx-toolbox/sphinx-debuginfo :alt: GitHub top language -.. |commits-since| image:: https://img.shields.io/github/commits-since/sphinx-toolbox/sphinx-debuginfo/v0.2.0 +.. |commits-since| image:: https://img.shields.io/github/commits-since/sphinx-toolbox/sphinx-debuginfo/v0.2.2.post1 :target: https://github.com/sphinx-toolbox/sphinx-debuginfo/pulse :alt: GitHub commits since tagged version @@ -89,7 +89,7 @@ sphinx-debuginfo :target: https://github.com/sphinx-toolbox/sphinx-debuginfo/commit/master :alt: GitHub last commit -.. |maintained| image:: https://img.shields.io/maintenance/yes/2021 +.. |maintained| image:: https://img.shields.io/maintenance/yes/2025 :alt: Maintenance .. |pypi-downloads| image:: https://img.shields.io/pypi/dm/sphinx-debuginfo diff --git a/__pkginfo__.py b/__pkginfo__.py deleted file mode 100644 index fc107d7..0000000 --- a/__pkginfo__.py +++ /dev/null @@ -1,20 +0,0 @@ -# This file is managed by 'repo_helper'. Don't edit it directly. -# Copyright © 2020 Dominic Davis-Foster -# -# This file is distributed under the same license terms as the program it came with. -# There will probably be a file called LICEN[S/C]E in the same directory as this file. -# -# In any case, this program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# -# This script based on https://github.com/rocky/python-uncompyle6/blob/master/__pkginfo__.py -# - -__all__ = [ - "__version__", - "extras_require", - ] - -__version__ = "0.2.0" -extras_require = {} diff --git a/formate.toml b/formate.toml index aec0bb5..b0168cc 100644 --- a/formate.toml +++ b/formate.toml @@ -6,21 +6,17 @@ noqa-reformat = 60 ellipsis-reformat = 70 squish_stubs = 80 -[config] -indent = "\t" -line_length = 115 - [hooks.yapf] priority = 30 -[hooks.isort] -priority = 50 - [hooks.yapf.kwargs] yapf_style = ".style.yapf" +[hooks.isort] +priority = 50 + [hooks.isort.kwargs] -indent = "\t\t" +indent = " " multi_line_output = 8 import_heading_stdlib = "stdlib" import_heading_thirdparty = "3rd party" @@ -35,6 +31,7 @@ known_third_party = [ "coincidence", "coverage", "coverage_pyver_pragma", + "defusedxml", "domdf_python_tools", "importlib_metadata", "pytest", @@ -42,7 +39,12 @@ known_third_party = [ "pytest_randomly", "pytest_timeout", "sphinx", + "sphinx_jinja2_compat", "sphinx_toolbox", "tabulate", ] -known_first_party = "sphinx_debuginfo" +known_first_party = [ "sphinx_debuginfo",] + +[config] +indent = " " +line_length = 115 diff --git a/justfile b/justfile new file mode 100644 index 0000000..e8ed871 --- /dev/null +++ b/justfile @@ -0,0 +1,22 @@ +default: lint + +pdf-docs: latex-docs + make -C doc-source/build/latex/ + +latex-docs: + SPHINX_BUILDER=latex tox -e docs + +unused-imports: + tox -e lint -- --select F401 + +incomplete-defs: + tox -e lint -- --select MAN + +vdiff: + git diff $(repo-helper show version -q)..HEAD + +bare-ignore: + greppy '# type:? *ignore(?!\[|\w)' -s + +lint: unused-imports incomplete-defs bare-ignore + tox -n qa diff --git a/pyproject.toml b/pyproject.toml index 9800c2d..8ed7e51 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,20 +4,19 @@ build-backend = "whey" [project] name = "sphinx-debuginfo" -version = "0.2.0" +version = "0.2.2.post1" description = "A Sphinx extension to include debugging information in the output." readme = "README.rst" -keywords = [ "debug", "sphinx",] +keywords = [ "debug", "sphinx", "sphinx-extension",] dynamic = [ "requires-python", "classifiers", "dependencies",] -[[project.authors]] -email = "dominic@davis-foster.co.uk" -name = "Dominic Davis-Foster" - - [project.license] file = "LICENSE" +[[project.authors]] +name = "Dominic Davis-Foster" +email = "dominic@davis-foster.co.uk" + [project.urls] Homepage = "https://github.com/sphinx-toolbox/sphinx-debuginfo" "Issue Tracker" = "https://github.com/sphinx-toolbox/sphinx-debuginfo/issues" @@ -26,6 +25,9 @@ Homepage = "https://github.com/sphinx-toolbox/sphinx-debuginfo" [tool.importcheck] always = [ "sphinx_debuginfo",] +[tool.importcheck.config] +show = true + [tool.whey] base-classifiers = [ "Development Status :: 4 - Beta", @@ -36,15 +38,39 @@ base-classifiers = [ "Topic :: Software Development :: Documentation", "Typing :: Typed", ] -python-versions = [ "3.6", "3.7", "3.8", "3.9",] -python-implementations = [ "CPython",] +python-versions = [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13",] +python-implementations = [ "CPython", "PyPy",] platforms = [ "Windows", "macOS", "Linux",] license-key = "MIT" package = "sphinx_debuginfo" -[tool.mkrecipe] -conda-channels = [ "conda-forge", "domdfcoding",] -extras = "all" +[tool.mypy] +python_version = "3.9" +namespace_packages = true +check_untyped_defs = true +warn_unused_ignores = true +no_implicit_optional = true +show_error_codes = true -[tool.importcheck.config] -show = true +[tool.snippet-fmt] +directives = [ "code-block",] + +[tool.snippet-fmt.languages.python] +reformat = true + +[tool.snippet-fmt.languages.TOML] +reformat = true + +[tool.snippet-fmt.languages.ini] + +[tool.snippet-fmt.languages.json] + +[tool.dep_checker] +allowed_unused = [ "sphinx_jinja2_compat",] + +[tool.dependency-dash."requirements.txt"] +order = 10 + +[tool.dependency-dash."tests/requirements.txt"] +order = 20 +include = false diff --git a/repo_helper.yml b/repo_helper.yml index e131764..98e6b67 100644 --- a/repo_helper.yml +++ b/repo_helper.yml @@ -7,28 +7,36 @@ email: 'dominic@davis-foster.co.uk' username: 'sphinx-toolbox' assignee: 'domdfcoding' primary_conda_channel: 'domdfcoding' -version: '0.2.0' +version: '0.2.2.post1' license: 'MIT' short_desc: 'A Sphinx extension to include debugging information in the output.' -mypy_version: 0.812 use_whey: true enable_docs: false -enable_conda: false # TODO +enable_conda: false min_coverage: 100 +mypy_version: 1.16 +python_deploy_version: 3.9 conda_channels: - conda-forge python_versions: - - 3.6 - 3.7 - 3.8 - 3.9 + - "3.10" + - "3.11" + - "3.12" + - "3.13" + - pypy37 + - pypy38 + - pypy39 keywords: - debug - sphinx + - sphinx-extension classifiers: - 'Development Status :: 4 - Beta' diff --git a/requirements.txt b/requirements.txt index e2c63d5..a5e6593 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ -domdf-python-tools>=2.7.0 +domdf-python-tools>=3.2.2.post1 sphinx>=3.0.3 +sphinx-jinja2-compat>=0.1.2 tabulate>=0.8.9 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index a6dfbb7..0000000 --- a/setup.cfg +++ /dev/null @@ -1,14 +0,0 @@ -# This file is managed by 'repo_helper'. -# You may add new sections, but any changes made to the following sections will be lost: -# * metadata -# * options -# * options.packages.find -# * mypy -# * options.entry_points - -[mypy] -python_version = 3.6 -namespace_packages = True -check_untyped_defs = True -warn_unused_ignores = True -incremental = False diff --git a/sphinx_debuginfo/__init__.py b/sphinx_debuginfo/__init__.py index bb8175f..33fe8a0 100644 --- a/sphinx_debuginfo/__init__.py +++ b/sphinx_debuginfo/__init__.py @@ -27,7 +27,7 @@ # # stdlib -from typing import Any, Dict +from typing import Any, Dict, Optional # 3rd party import tabulate @@ -38,13 +38,13 @@ __author__: str = "Dominic Davis-Foster" __copyright__: str = "2021 Dominic Davis-Foster" __license__: str = "MIT License" -__version__: str = "0.2.0" +__version__: str = "0.2.2.post1" __email__: str = "dominic@davis-foster.co.uk" __all__ = ["setup", "write_debug_info"] -def write_debug_info(app: Sphinx, exception: Exception = None) -> None: +def write_debug_info(app: Sphinx, exception: Optional[Exception] = None) -> None: """ Write the file(s) containing debugging information. @@ -55,12 +55,12 @@ def write_debug_info(app: Sphinx, exception: Exception = None) -> None: if exception: # pragma: no cover return - if app.builder.format.lower() != "html": + if app.builder is None or app.builder.format.lower() != "html": # pragma: no cover return packages = [] - distribution: importlib_metadata.PathDistribution + distribution: importlib_metadata.Distribution for distribution in importlib_metadata.distributions(): packages.append((distribution.metadata["Name"], distribution.version)) @@ -77,12 +77,12 @@ def write_debug_info(app: Sphinx, exception: Exception = None) -> None: '', "", ' ', - " Sphinx Debuginfo</description>", + " <title>Sphinx Debuginfo", ' ', "", '', "", - "

Packages and versions used to build these docs:

", + "

Packages and versions used to build these docs:

", table, "", '', diff --git a/stubs.txt b/stubs.txt index 07bd288..1dfe810 100644 --- a/stubs.txt +++ b/stubs.txt @@ -1 +1,2 @@ git+https://github.com/domdfcoding/pytest-regressions-stubs +types-tabulate diff --git a/tests/requirements.txt b/tests/requirements.txt index c571c30..18afe73 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,6 +1,7 @@ coincidence>=0.2.0 coverage>=5.1 coverage-pyver-pragma>=0.2.1 +defusedxml>=0.7.1 domdf-python-tools[testing]>=2.0.1 importlib-metadata>=3.6.0 iniconfig!=1.1.0,>=1.0.1 diff --git a/tests/test_output/conftest.py b/tests/test_output/conftest.py index 1cb4f33..a671e6b 100644 --- a/tests/test_output/conftest.py +++ b/tests/test_output/conftest.py @@ -28,11 +28,11 @@ # stdlib import random -from typing import Any, Dict, NamedTuple, Sequence, Tuple +from typing import Any, Dict, Iterator, NamedTuple, Sequence, Tuple # 3rd party import pytest -from bs4 import BeautifulSoup # type: ignore +from bs4 import BeautifulSoup from domdf_python_tools.paths import PathPlus from sphinx.testing.fixtures import app, make_app, shared_result, sphinx_test_tempdir, test_params from sphinx.testing.path import path @@ -107,7 +107,7 @@ def app_params( @pytest.fixture() -def page(app, request, monkeypatch) -> BeautifulSoup: +def page(app, request, monkeypatch) -> Iterator[BeautifulSoup]: random.seed("5678") app.build(force_all=True) diff --git a/tests/test_output/test_output.py b/tests/test_output/test_output.py index 97e7146..995dcd9 100644 --- a/tests/test_output/test_output.py +++ b/tests/test_output/test_output.py @@ -3,12 +3,13 @@ # 3rd party import pytest -from bs4 import BeautifulSoup # type: ignore +from bs4 import BeautifulSoup from domdf_python_tools.paths import PathPlus from pytest_regressions.file_regression import FileRegressionFixture +from sphinx.application import Sphinx -def test_build_example(app): +def test_build_example(app: Sphinx): app.build() app.build() @@ -20,11 +21,11 @@ def test_html_output(page: BeautifulSoup, file_regression: FileRegressionFixture @pytest.mark.sphinx("latex", srcdir="test-root") -def test_latex_output(app): +def test_latex_output(app: Sphinx): random.seed("5678") assert app.builder.name.lower() == "latex" app.build() - assert not PathPlus(app.outdir / "_debug" / "index.html").is_file() - assert not PathPlus(app.outdir / "_debug").is_dir() + assert not PathPlus(app.outdir / "_debug" / "index.html").is_file() # type: ignore[operator] + assert not PathPlus(app.outdir / "_debug").is_dir() # type: ignore[operator] diff --git a/tox.ini b/tox.ini index 17a0783..c488f93 100644 --- a/tox.ini +++ b/tox.ini @@ -3,9 +3,15 @@ # * tox # * envlists # * testenv +# * testenv:.package +# * testenv:py313-dev +# * testenv:py313 +# * testenv:py312-dev +# * testenv:py312 # * testenv:docs # * testenv:build # * testenv:lint +# * testenv:perflint # * testenv:mypy # * testenv:pyup # * testenv:coverage @@ -16,76 +22,128 @@ # * pytest [tox] -envlist = py36, py37, py38, py39, mypy, build +envlist = + py37 + py38 + py39 + py310 + py311 + py312 + py313 + pypy37 + pypy38 + pypy39 + mypy + build skip_missing_interpreters = True isolated_build = True requires = - pip>=20.3.3 + pip>=21,!=22.2 tox-envlist>=0.2.1 - tox-pip-version>=0.0.7 + tox~=3.0 + virtualenv!=20.16.0 [envlists] -test = py36, py37, py38, py39 +test = py37, py38, py39, py310, py311, py312, py313, pypy37, pypy38, pypy39 qa = mypy, lint -cov = py36, coverage +cov = py39, coverage [testenv] -setenv = PYTHONDEVMODE = 1 +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 + SETUPTOOLS_USE_DISTUTILS=stdlib deps = -r{toxinidir}/tests/requirements.txt commands = python --version python -m pytest --cov=sphinx_debuginfo -r aR tests/ {posargs} +[testenv:.package] +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 + +[testenv:py313] +download = True +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 + UNSAFE_PYO3_SKIP_VERSION_CHECK=1 + +[testenv:py312] +download = True +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 + [testenv:build] +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 + PIP_PREFER_BINARY=1 + UNSAFE_PYO3_SKIP_VERSION_CHECK=1 skip_install = True changedir = {toxinidir} deps = build[virtualenv]>=0.3.1 check-wheel-contents>=0.1.0 twine>=3.2.0 + cryptography<40; implementation_name == "pypy" and python_version <= "3.7" commands = python -m build --sdist --wheel "{toxinidir}" twine check dist/*.tar.gz dist/*.whl check-wheel-contents dist/ [testenv:lint] -basepython = python3.6 +basepython = python3.9 changedir = {toxinidir} ignore_errors = True skip_install = True deps = - flake8 >=3.8.2 - flake8-2020 >= 1.6.0 + flake8>=3.8.2,<5 + flake8-2020>=1.6.0 flake8-builtins>=1.5.3 flake8-docstrings>=1.5.0 flake8-dunder-all>=0.1.1 flake8-encodings>=0.1.0 flake8-github-actions>=0.1.0 - flake8-pyi>=20.10.0 - flake8-pytest-style>=1.3.0 + flake8-noqa>=1.1.0,<=1.2.2 + flake8-pyi>=20.10.0,<=22.8.0 + flake8-pytest-style>=1.3.0,<2 + flake8-quotes>=3.3.0 flake8-slots>=0.1.0 flake8-sphinx-links>=0.0.4 flake8-strftime>=0.1.1 flake8-typing-imports>=1.10.0 - git+https://github.com/domdfcoding/flake8-quotes.git git+https://github.com/domdfcoding/flake8-rst-docstrings-sphinx.git git+https://github.com/domdfcoding/flake8-rst-docstrings.git - pydocstyle>=6.0.0 + git+https://github.com/python-formate/flake8-unused-arguments.git@magic-methods + 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 sphinx_debuginfo tests --allow-toolbox {posargs} +[testenv:perflint] +basepython = python3.9 +changedir = {toxinidir} +ignore_errors = True +skip_install = True +deps = perflint +commands = python3 -m perflint sphinx_debuginfo {posargs} + [testenv:mypy] -basepython = python3.6 +basepython = python3.9 ignore_errors = True changedir = {toxinidir} deps = - mypy==0.812 + mypy==1.16 -r{toxinidir}/tests/requirements.txt -r{toxinidir}/stubs.txt commands = mypy sphinx_debuginfo tests {posargs} [testenv:pyup] -basepython = python3.6 +basepython = python3.9 skip_install = True ignore_errors = True changedir = {toxinidir} @@ -93,7 +151,7 @@ deps = pyupgrade-directories commands = pyup_dirs sphinx_debuginfo tests --py36-plus --recursive [testenv:coverage] -basepython = python3.6 +basepython = python3.9 skip_install = True ignore_errors = True whitelist_externals = /bin/bash @@ -101,6 +159,7 @@ passenv = COV_PYTHON_VERSION COV_PLATFORM COV_PYTHON_IMPLEMENTATION + * changedir = {toxinidir} deps = coverage>=5 @@ -112,12 +171,15 @@ 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 A003 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 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 +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 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 extend-exclude = doc-source,old,build,dist,__pkginfo__.py,setup.py,venv rst-directives = TODO envvar extras-require + license + license-info +rst-roles = choosealicense per-file-ignores = tests/*: 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 */*.pyi: 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 @@ -126,20 +188,25 @@ inline-quotes = " multiline-quotes = """ docstring-quotes = """ count = True -min_python_version = 3.6.1 +min_python_version = 3.7 +unused-arguments-ignore-abstract-functions = True +unused-arguments-ignore-overload-functions = True +unused-arguments-ignore-magic-methods = True +unused-arguments-ignore-variadic-names = True [coverage:run] plugins = coverage_pyver_pragma [coverage:report] fail_under = 100 +show_missing = True exclude_lines = raise AssertionError raise NotImplementedError if 0: if False: - if TYPE_CHECKING: - if typing.TYPE_CHECKING: + if TYPE_CHECKING + if typing.TYPE_CHECKING if __name__ == .__main__.: [check-wheel-contents]