diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 7edd6f1..bd34923 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.1.2 +current_version = 0.1.5 commit = True tag = True 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/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 e5625b7..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: [] @@ -31,10 +31,10 @@ exemptAssignees: false 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/docs_test_action.yml b/.github/workflows/docs_test_action.yml index 8eb7a54..8f60ba5 100644 --- a/.github/workflows/docs_test_action.yml +++ b/.github/workflows/docs_test_action.yml @@ -17,7 +17,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ - uses: "actions/checkout@v1" + uses: "actions/checkout@v4" - name: Check for changed files uses: dorny/paths-filter@v2 diff --git a/.github/workflows/flake8.yml b/.github/workflows/flake8.yml index 84e9436..5e67c5c 100644 --- a/.github/workflows/flake8.yml +++ b/.github/workflows/flake8.yml @@ -16,11 +16,11 @@ permissions: 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 @@ -33,9 +33,9 @@ jobs: - name: Setup Python 🐍 if: steps.changes.outputs.code == 'true' - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v5" with: - python-version: "3.6" + python-version: "3.9" - name: Install dependencies 🔧 if: steps.changes.outputs.code == 'true' @@ -43,7 +43,7 @@ jobs: 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" if: steps.changes.outputs.code == 'true' diff --git a/.github/workflows/mypy.yml b/.github/workflows/mypy.yml index 5a7324b..4c22a52 100644 --- a/.github/workflows/mypy.yml +++ b/.github/workflows/mypy.yml @@ -20,12 +20,12 @@ 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 @@ -38,16 +38,16 @@ jobs: - name: Setup Python 🐍 if: steps.changes.outputs.code == 'true' - uses: "actions/setup-python@v2" + 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" if: steps.changes.outputs.code == 'true' diff --git a/.github/workflows/python_ci.yml b/.github/workflows/python_ci.yml index 4f703f7..0c0a148 100644 --- a/.github/workflows/python_ci.yml +++ b/.github/workflows/python_ci.yml @@ -13,29 +13,32 @@ on: 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,3.10.0-rc.2' + USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13' strategy: fail-fast: False matrix: config: - - {python-version: "3.6", testenvs: "py36-click{7,8},build", experimental: False} - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - - {python-version: "3.10.0-rc.2", testenvs: "py310-dev-click{7,8},build", experimental: True} + - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} + - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} + - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} + - {python-version: "3.13", testenvs: "py313-click{7,8},build", experimental: False} steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true @@ -50,7 +53,7 @@ jobs: - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.config.python-version }}" @@ -60,15 +63,16 @@ jobs: 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 }}" if: steps.setup-python.outcome == 'success' run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v2 + 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 557668f..6bbee2e 100644 --- a/.github/workflows/python_ci_linux.yml +++ b/.github/workflows/python_ci_linux.yml @@ -14,29 +14,32 @@ on: 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,3.10.0-rc.2' + USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13' strategy: fail-fast: False matrix: config: - - {python-version: "3.6", testenvs: "py36-click{7,8},build", experimental: False} - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - - {python-version: "3.10.0-rc.2", testenvs: "py310-dev-click{7,8},build", experimental: True} + - {python-version: "3.10", testenvs: "py310-click{7,8},build", experimental: False} + - {python-version: "3.11", testenvs: "py311-click{7,8},build", experimental: False} + - {python-version: "3.12", testenvs: "py312-click{7,8},build", experimental: False} + - {python-version: "3.13", testenvs: "py313-click{7,8},build", experimental: False} steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true @@ -51,7 +54,7 @@ jobs: - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.config.python-version }}" @@ -61,7 +64,7 @@ jobs: 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 }}" @@ -69,22 +72,23 @@ jobs: run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v2 + 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 @@ -94,26 +98,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: | @@ -122,29 +132,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/') @@ -153,3 +163,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 bfd2eb4..b945833 100644 --- a/.github/workflows/python_ci_macos.yml +++ b/.github/workflows/python_ci_macos.yml @@ -13,29 +13,32 @@ on: 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,3.10.0-rc.2' + USING_COVERAGE: '3.7,3.8,3.9,3.10,3.11,3.12,3.13' strategy: fail-fast: False matrix: config: - - {python-version: "3.6", testenvs: "py36-click{7,8},build", experimental: False} - - {python-version: "3.7", testenvs: "py37-click{7,8},build", experimental: False} - - {python-version: "3.8", testenvs: "py38-click{7,8},build", experimental: False} - - {python-version: "3.9", testenvs: "py39-click{7,8},build", experimental: False} - - {python-version: "3.10.0-rc.2", testenvs: "py310-dev-click{7,8},build", experimental: True} + - {python-version: "3.7", os-ver: "13", testenvs: "py37-click{7,8},build", experimental: False} + - {python-version: "3.8", os-ver: "14", testenvs: "py38-click{7,8},build", experimental: False} + - {python-version: "3.9", os-ver: "14", testenvs: "py39-click{7,8},build", experimental: False} + - {python-version: "3.10", os-ver: "14", testenvs: "py310-click{7,8},build", experimental: False} + - {python-version: "3.11", os-ver: "14", testenvs: "py311-click{7,8},build", experimental: False} + - {python-version: "3.12", os-ver: "14", testenvs: "py312-click{7,8},build", experimental: False} + - {python-version: "3.13", os-ver: "14", testenvs: "py313-click{7,8},build", experimental: False} steps: - name: Checkout 🛎️ - uses: "actions/checkout@v2" + uses: "actions/checkout@v4" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true @@ -50,7 +53,7 @@ jobs: - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} - uses: "actions/setup-python@v2" + uses: "actions/setup-python@v5" with: python-version: "${{ matrix.config.python-version }}" @@ -60,15 +63,16 @@ jobs: 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 }}" if: steps.setup-python.outcome == 'success' run: python -m tox -e "${{ matrix.config.testenvs }}" -s false - name: "Upload Coverage 🚀" - uses: actions/upload-artifact@v2 + 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 6c7dc41..857b362 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,11 +1,14 @@ # This file is managed by 'repo_helper'. Don't edit it directly. --- -exclude: ^$ +exclude: ^(tests/test_snippet_fmt_/.*\.rst|tests/example.rst)$ + +ci: + autoupdate_schedule: quarterly repos: - repo: https://github.com/repo-helper/pyproject-parser - rev: v0.4.2 + rev: v0.13.0 hooks: - id: reformat-pyproject @@ -30,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: @@ -39,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: ^snippet_fmt/.*\.py$ - repo: https://github.com/domdfcoding/flake2lint - rev: v0.4.1 + rev: v0.4.3 hooks: - id: flake2lint - repo: https://github.com/pre-commit/pygrep-hooks - rev: v1.9.0 + rev: v1.10.0 hooks: - id: python-no-eval - id: rst-backticks @@ -67,24 +70,24 @@ repos: - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.1.10 + rev: v1.5.1 hooks: - id: remove-crlf - id: forbid-crlf - repo: https://github.com/python-formate/snippet-fmt - rev: v0.1.1 + rev: v0.1.5 hooks: - id: snippet-fmt - repo: https://github.com/python-formate/formate - rev: v0.4.9 + 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/.readthedocs.yml b/.readthedocs.yml index 41d2e57..83fc025 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -9,9 +9,16 @@ formats: - pdf - htmlzip python: - version: 3.8 install: - requirements: requirements.txt - requirements: doc-source/requirements.txt - - method: pip - path: . +build: + os: ubuntu-22.04 + tools: + python: '3.9' + jobs: + post_create_environment: + - pip install . + post_install: + - pip install sphinxcontrib-applehelp==1.0.4 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.1 + sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 diff --git a/README.rst b/README.rst index afd3705..b3dc9cf 100644 --- a/README.rst +++ b/README.rst @@ -56,8 +56,8 @@ snippet-fmt :target: https://github.com/python-formate/snippet-fmt/actions?query=workflow%3A%22mypy%22 :alt: mypy status -.. |requires| image:: https://dependency-dash.herokuapp.com/github/python-formate/snippet-fmt/badge.svg - :target: https://dependency-dash.herokuapp.com/github/python-formate/snippet-fmt/ +.. |requires| image:: https://dependency-dash.repo-helper.uk/github/python-formate/snippet-fmt/badge.svg + :target: https://dependency-dash.repo-helper.uk/github/python-formate/snippet-fmt/ :alt: Requirements Status .. |coveralls| image:: https://img.shields.io/coveralls/github/python-formate/snippet-fmt/master?logo=coveralls @@ -91,7 +91,7 @@ snippet-fmt .. |language| image:: https://img.shields.io/github/languages/top/python-formate/snippet-fmt :alt: GitHub top language -.. |commits-since| image:: https://img.shields.io/github/commits-since/python-formate/snippet-fmt/v0.1.2 +.. |commits-since| image:: https://img.shields.io/github/commits-since/python-formate/snippet-fmt/v0.1.5 :target: https://github.com/python-formate/snippet-fmt/pulse :alt: GitHub commits since tagged version @@ -99,7 +99,7 @@ snippet-fmt :target: https://github.com/python-formate/snippet-fmt/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/snippet-fmt diff --git a/__pkginfo__.py b/__pkginfo__.py deleted file mode 100644 index ea4ef04..0000000 --- a/__pkginfo__.py +++ /dev/null @@ -1,16 +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__ = ["extras_require"] - -extras_require = {} diff --git a/doc-source/_static/style.css b/doc-source/_static/style.css index 7077a55..a6b8e4d 100644 --- a/doc-source/_static/style.css +++ b/doc-source/_static/style.css @@ -13,3 +13,7 @@ div.versionchanged ul, div.versionremoved ul { margin-left: 20px; margin-top: 0; } + +.longtable.autosummary { + width: 100%; +} diff --git a/doc-source/api/config.rst b/doc-source/api/config.rst index cd3b9ea..522a977 100644 --- a/doc-source/api/config.rst +++ b/doc-source/api/config.rst @@ -2,4 +2,5 @@ :mod:`snippet_fmt.config` =========================== +.. autosummary-widths:: 3/10 .. automodule:: snippet_fmt.config diff --git a/doc-source/api/formatters.rst b/doc-source/api/formatters.rst index 7f98557..52115e2 100644 --- a/doc-source/api/formatters.rst +++ b/doc-source/api/formatters.rst @@ -2,4 +2,5 @@ :mod:`snippet_fmt.formatters` =============================== +.. autosummary-widths:: 4/10 .. automodule:: snippet_fmt.formatters diff --git a/doc-source/api/snippet-fmt.rst b/doc-source/api/snippet-fmt.rst index 7eae72e..ff23399 100644 --- a/doc-source/api/snippet-fmt.rst +++ b/doc-source/api/snippet-fmt.rst @@ -2,4 +2,5 @@ :mod:`snippet_fmt` ======================== +.. autosummary-widths:: 45/100 .. automodule:: snippet_fmt diff --git a/doc-source/changelog.rst b/doc-source/changelog.rst index 5d64215..f398354 100644 --- a/doc-source/changelog.rst +++ b/doc-source/changelog.rst @@ -2,6 +2,21 @@ Changelog =============== +v0.1.4 +---------- + +Fixed typo in the regular expression preventing single line code blocks from matching. + +v0.1.3 +---------- + +Ensure indentation is preserved with nested directives. + +v0.1.2 +---------- + +Correctly handle indentation containing mixed tabs and spaces. + v0.1.1 ---------- diff --git a/doc-source/conf.py b/doc-source/conf.py index b1a7a77..4180de1 100644 --- a/doc-source/conf.py +++ b/doc-source/conf.py @@ -27,7 +27,8 @@ slug = re.sub(r'\W+', '-', project.lower()) release = version = config.version -todo_include_todos = bool(os.environ.get("SHOW_TODOS", 0)) +sphinx_builder = os.environ.get("SPHINX_BUILDER", "html").lower() +todo_include_todos = int(os.environ.get("SHOW_TODOS", 0)) and sphinx_builder != "latex" intersphinx_mapping = { "python": ("https://docs.python.org/3/", None), @@ -70,13 +71,41 @@ } +# Fix for pathlib issue with sphinxemoji on Python 3.9 and Sphinx 4.x +def copy_asset_files(app, exc): + # 3rd party + from domdf_python_tools.compat import importlib_resources + from sphinx.util.fileutil import copy_asset + + if exc: + return + + asset_files = ["twemoji.js", "twemoji.css"] + for path in asset_files: + path_str = os.fspath(importlib_resources.files("sphinxemoji") / path) + copy_asset(path_str, os.path.join(app.outdir, "_static")) + + def setup(app): # 3rd party from sphinx_toolbox.latex import better_header_layout + from sphinxemoji import sphinxemoji app.connect("config-inited", lambda app, config: better_header_layout(config)) + app.connect("build-finished", copy_asset_files) + app.add_js_file("https://unpkg.com/twemoji@latest/dist/twemoji.min.js") + app.add_js_file("twemoji.js") + app.add_css_file("twemoji.css") + app.add_transform(sphinxemoji.EmojiSubstitutions) nitpicky = True toctree_plus_types.add("tconf") toml_spec_version = "0.5.0" +needspace_amount = r"5\baselineskip" +favicons = [{ + "rel": "icon", + "href": "https://python-formate.github.io/assets/formate.ico", + "sizes": "48x48", + "type": "image/vnd.microsoft.icon" + }] diff --git a/doc-source/configuration.rst b/doc-source/configuration.rst index 745d5e0..ae5b4c5 100644 --- a/doc-source/configuration.rst +++ b/doc-source/configuration.rst @@ -177,7 +177,7 @@ Example .. code-block:: toml [tool.snippet-fmt] - directives = ['code', 'code-block', 'sourcecode'] + directives = [ "code", "code-block", "sourcecode",] [tool.snippet-fmt.languages.python] reformat = true @@ -187,6 +187,7 @@ Example reformat = true [tool.snippet-fmt.languages.toml] + [tool.snippet-fmt.languages.ini] This will: diff --git a/doc-source/index.rst b/doc-source/index.rst index efb8a6e..87a2f15 100644 --- a/doc-source/index.rst +++ b/doc-source/index.rst @@ -58,8 +58,8 @@ snippet-fmt :workflow: mypy :alt: mypy status - .. |requires| image:: https://dependency-dash.herokuapp.com/github/python-formate/snippet-fmt/badge.svg - :target: https://dependency-dash.herokuapp.com/github/python-formate/snippet-fmt/ + .. |requires| image:: https://dependency-dash.repo-helper.uk/github/python-formate/snippet-fmt/badge.svg + :target: https://dependency-dash.repo-helper.uk/github/python-formate/snippet-fmt/ :alt: Requirements Status .. |coveralls| coveralls-shield:: @@ -97,14 +97,14 @@ snippet-fmt :alt: GitHub top language .. |commits-since| github-shield:: - :commits-since: v0.1.2 + :commits-since: v0.1.5 :alt: GitHub commits since tagged version .. |commits-latest| github-shield:: :last-commit: :alt: GitHub last commit - .. |maintained| maintained-shield:: 2021 + .. |maintained| maintained-shield:: 2025 :alt: Maintenance .. |pypi-downloads| pypi-shield:: diff --git a/doc-source/requirements.txt b/doc-source/requirements.txt index 6708def..947ae5c 100644 --- a/doc-source/requirements.txt +++ b/doc-source/requirements.txt @@ -1,18 +1,24 @@ git+https://github.com/domdfcoding/sphinx-click.git git+https://github.com/sphinx-toolbox/sphinx-toolbox-experimental.git -default-values>=0.5.0 -extras-require>=0.2.0 -furo>=2020.11.19b18 -seed-intersphinx-mapping>=0.3.1 +default-values>=0.6.0 +extras-require>=0.5.0 +furo==2021.06.18b36 +html-section>=0.3.0 +seed-intersphinx-mapping>=1.2.2 sphinx>=3.0.3 sphinx-copybutton>=0.2.12 -sphinx-debuginfo>=0.1.0 -sphinx-licenseinfo>=0.1.1 +sphinx-debuginfo>=0.2.2 +sphinx-favicon>=0.2 +sphinx-licenseinfo>=0.3.1 sphinx-notfound-page>=0.7.1 sphinx-packaging>=0.1.0 -sphinx-prompt>=1.1.0 sphinx-pyproject>=0.1.0 -sphinx-tabs>=1.1.13 -sphinx-toolbox>=2.13.0b3 +sphinx-toolbox>=3.5.0 +sphinxcontrib-applehelp==1.0.4 +sphinxcontrib-devhelp==1.0.2 +sphinxcontrib-htmlhelp==2.0.1 +sphinxcontrib-jsmath==1.0.1 +sphinxcontrib-qthelp==1.0.3 +sphinxcontrib-serializinghtml==1.1.5 sphinxemoji>=0.1.6 -toctree-plus>=0.5.0 +toctree-plus>=0.6.1 diff --git a/doc-source/usage.rst b/doc-source/usage.rst index 20c8dfe..e1dfe21 100644 --- a/doc-source/usage.rst +++ b/doc-source/usage.rst @@ -22,7 +22,7 @@ To do so, add the following to your `.pre-commit-config.yaml `_ file: .. pre-commit:: - :rev: 0.1.2 + :rev: 0.1.5 :hooks: snippet-fmt :args: --verbose diff --git a/formate.toml b/formate.toml index ea929a4..f7412f2 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" @@ -48,4 +44,8 @@ known_third_party = [ "pytest_timeout", "typing_extensions", ] -known_first_party = "snippet_fmt" +known_first_party = [ "snippet_fmt",] + +[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 780131d..3eb022d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,20 +4,19 @@ build-backend = "whey" [project] name = "snippet-fmt" -version = "0.1.2" +version = "0.1.5" description = "Format and validate code snippets in reStructuredText files." readme = "README.rst" keywords = [ "docs", "formatting", "linting",] dynamic = [ "requires-python", "classifiers", "dependencies",] +[project.license] +file = "LICENSE" + [[project.authors]] name = "Dominic Davis-Foster" email = "dominic@davis-foster.co.uk" - -[project.license] -file = "LICENSE" - [project.urls] Homepage = "https://github.com/python-formate/snippet-fmt" "Issue Tracker" = "https://github.com/python-formate/snippet-fmt/issues" @@ -34,7 +33,7 @@ base-classifiers = [ "Intended Audience :: Developers", "Typing :: Typed", ] -python-versions = [ "3.6", "3.7", "3.8", "3.9",] +python-versions = [ "3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13",] python-implementations = [ "CPython",] platforms = [ "Windows", "macOS", "Linux",] license-key = "MIT" @@ -54,29 +53,28 @@ extensions = [ "sphinx_toolbox.more_autosummary", "sphinx_toolbox.documentation_summary", "sphinx_toolbox.tweaks.param_dash", + "sphinxcontrib.toctree_plus", "sphinx_toolbox.tweaks.latex_layout", "sphinx_toolbox.tweaks.latex_toc", "sphinx.ext.intersphinx", "sphinx.ext.mathjax", "sphinxcontrib.extras_require", "sphinx.ext.todo", - "sphinxemoji.sphinxemoji", "notfound.extension", "sphinx_copybutton", "sphinxcontrib.default_values", - "sphinxcontrib.toctree_plus", "sphinx_debuginfo", "sphinx_licenseinfo", "seed_intersphinx_mapping", + "html_section", "attr_utils.autoattrs", "sphinx_click", "sphinx_toolbox.pre_commit", - "sphinx_toolbox_experimental.html_section", - "sphinx_toolbox_experimental.autosummary_widths", + "sphinx_toolbox.more_autosummary.column_widths", + "sphinx_favicon", "sphinx_toolbox_experimental.missing_xref", "sphinx_packaging", ] -sphinxemoji_style = "twemoji" gitstamp_fmt = "%d %b %Y" templates_path = [ "_templates",] html_static_path = [ "_static",] @@ -126,7 +124,7 @@ autodoc_exclude_members = [ ] [tool.mypy] -python_version = "3.6" +python_version = "3.9" namespace_packages = true check_untyped_defs = true warn_unused_ignores = true @@ -136,17 +134,6 @@ show_error_codes = true [tool.snippet-fmt] directives = [ "code-block",] -[tool.dependency-dash."requirements.txt"] -order = 10 - -[tool.dependency-dash."tests/requirements.txt"] -order = 20 -include = false - -[tool.dependency-dash."doc-source/requirements.txt"] -order = 30 -include = false - [tool.snippet-fmt.languages.toml] reformat = true @@ -159,3 +146,14 @@ reformat = true [tool.snippet-fmt.languages.ini] [tool.snippet-fmt.languages.json] + +[tool.dependency-dash."requirements.txt"] +order = 10 + +[tool.dependency-dash."tests/requirements.txt"] +order = 20 +include = false + +[tool.dependency-dash."doc-source/requirements.txt"] +order = 30 +include = false diff --git a/repo_helper.yml b/repo_helper.yml index 125efce..bed2e48 100644 --- a/repo_helper.yml +++ b/repo_helper.yml @@ -6,7 +6,7 @@ author: 'Dominic Davis-Foster' email: 'dominic@davis-foster.co.uk' username: 'python-formate' assignee: 'domdfcoding' -version: '0.1.2' +version: '0.1.5' license: 'MIT' short_desc: 'Format and validate code snippets in reStructuredText files.' @@ -14,16 +14,18 @@ enable_conda: false use_whey: true min_coverage: 95 sphinx_html_theme: furo -#preserve_custom_theme: true -mypy_version: "0.910" docs_fail_on_warning: true +mypy_version: 1.16 +python_deploy_version: 3.9 python_versions: - - '3.6' - '3.7' - '3.8' - '3.9' - - 3.10-dev + - "3.10" + - "3.11" + - "3.12" + - "3.13" keywords: - formatting @@ -42,8 +44,8 @@ extra_sphinx_extensions: - attr_utils.autoattrs - sphinx_click - sphinx_toolbox.pre_commit - - sphinx_toolbox_experimental.html_section - - sphinx_toolbox_experimental.autosummary_widths + - sphinx_toolbox.more_autosummary.column_widths + - sphinx_favicon # - sphinx_toolbox_experimental.changelog - sphinx_toolbox_experimental.missing_xref - sphinx_packaging @@ -54,6 +56,8 @@ sphinx_conf_epilogue: - nitpicky = True - toctree_plus_types.add("tconf") - toml_spec_version = "0.5.0" + - needspace_amount = r"5\baselineskip" + - 'favicons = [{"rel": "icon", "href": "https://python-formate.github.io/assets/formate.ico", "sizes": "48x48", "type": "image/vnd.microsoft.icon"}]' exclude_files: - contributing @@ -62,3 +66,5 @@ third_party_version_matrix: click: - 7 - 8 + +pre_commit_exclude: "^(tests/test_snippet_fmt_/.*\\.rst|tests/example.rst)$" diff --git a/requirements.txt b/requirements.txt index c2c7180..c283f6a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ click>=8.0.1 consolekit>=1.2.3 -dom-toml>=0.5.0 +dom-toml>=2.0.0 domdf-python-tools>=3.0.0 entrypoints>=0.3 formate>=0.4.9 diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index aca1e00..0000000 --- a/setup.cfg +++ /dev/null @@ -1,10 +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 - -[options.entry_points] -console_scripts = snippet-fmt=snippet_fmt.__main__:main diff --git a/snippet_fmt/__init__.py b/snippet_fmt/__init__.py index ed4bd19..d5d69bd 100644 --- a/snippet_fmt/__init__.py +++ b/snippet_fmt/__init__.py @@ -38,7 +38,7 @@ # 3rd party import click -import entrypoints # type: ignore +import entrypoints # type: ignore[import-untyped] from consolekit.terminal_colours import ColourTrilean, resolve_color_default from consolekit.utils import coloured_diff from domdf_python_tools.paths import PathPlus @@ -53,10 +53,10 @@ __author__: str = "Dominic Davis-Foster" __copyright__: str = "2021 Dominic Davis-Foster" __license__: str = "MIT License" -__version__: str = "0.1.2" +__version__: str = "0.1.5" __email__: str = "dominic@davis-foster.co.uk" -__all__ = ["CodeBlockError", "RSTReformatter", "reformat_file"] +__all__ = ("CodeBlockError", "RSTReformatter", "reformat_file") TRAILING_NL_RE = re.compile(r'\n+\Z', re.MULTILINE) @@ -73,12 +73,18 @@ class CodeBlockError(NamedTuple): exc: Exception +# TODO: reformatter for docstrings + + class RSTReformatter: """ Reformat code snippets in a reStructuredText file. :param filename: The filename to reformat. :param config: The ``snippet_fmt`` configuration, parsed from a TOML file (or similar). + + .. autosummary-widths:: 35/100 + .. latex:clearpage:: """ #: The filename being reformatted. @@ -129,7 +135,7 @@ def run(self) -> bool: rf'((?P=indent)[ \t]+:.*\n)*' # Limitation: should be `(?P=body_indent)` rather than `[ \t]+` rf'\n*' rf')' - rf'(?P^((?P=indent)(?P[ \t]+).*)?\n(^((?P=indent)(?P=body_indent).*)?\n)+)', + rf'(?P^((?P=indent)(?P[ \t]+).*)?\n(^((?P=indent)(?P=body_indent).*)?\n)*)', re.MULTILINE, ) @@ -167,7 +173,7 @@ def process_match(self, match: Match[str]) -> str: with syntaxerror_for_file(self.filename): code = formatter(code, **lang_config) - code = textwrap.indent(code, match["body_indent"]) + code = textwrap.indent(code, match["indent"] + match["body_indent"]) return f'{match["before"]}{code.rstrip()}{trailing_ws}' def get_diff(self) -> str: @@ -224,7 +230,7 @@ def load_extra_formatters(self) -> None: for distro_config, _ in entrypoints.iter_files_distros(): if group in distro_config: for name, epstr in distro_config[group].items(): - with contextlib.suppress(entrypoints.BadEntryPoint, ImportError): + with contextlib.suppress(entrypoints.BadEntryPoint, ImportError): # pylint: disable=W8205 # TODO: show warning for bad entry point if verbose, or "strict"? ep = entrypoints.EntryPoint.from_string(epstr, name) self._formatters[name] = ep.load() @@ -234,7 +240,7 @@ def reformat_file( filename: PathLike, config: SnippetFmtConfigDict, colour: ColourTrilean = None, - ): + ) -> int: """ Reformat the given reStructuredText file, and show the diff if changes were made. diff --git a/snippet_fmt/__main__.py b/snippet_fmt/__main__.py index 2c3e613..c016770 100644 --- a/snippet_fmt/__main__.py +++ b/snippet_fmt/__main__.py @@ -38,7 +38,7 @@ from consolekit.tracebacks import handle_tracebacks, traceback_option from domdf_python_tools.typing import PathLike -__all__ = ["main"] +__all__ = ("main", ) @flag_option("--diff", "show_diff", help="Show a diff of changes made") @@ -71,7 +71,7 @@ def main( verbose: bool = False, show_traceback: bool = False, show_diff: bool = False, - ): + ) -> None: """ Reformat code snippets in the given reStructuredText files. """ @@ -97,7 +97,7 @@ def main( for path in filename: for pattern in exclude or []: - if re.match(fnmatch.translate(pattern), str(path)): + if re.match(fnmatch.translate(pattern), str(path)): # pylint: disable=loop-invariant-statement continue path = PathPlus(path).abspath() diff --git a/snippet_fmt/config.py b/snippet_fmt/config.py index 86add08..840032a 100644 --- a/snippet_fmt/config.py +++ b/snippet_fmt/config.py @@ -34,7 +34,7 @@ from domdf_python_tools.typing import PathLike from typing_extensions import TypedDict -__all__ = ["SnippetFmtConfigDict", "load_toml"] +__all__ = ("SnippetFmtConfigDict", "load_toml") class SnippetFmtConfigDict(TypedDict): @@ -98,7 +98,7 @@ def load_toml(filename: PathLike) -> SnippetFmtConfigDict: if "languages" in config: for language, lang_config in config.get("languages", {}).items(): - snippet_fmt_config["languages"][language] = lang_config + snippet_fmt_config["languages"][language] = lang_config # pylint: disable=loop-invariant-statement else: snippet_fmt_config["languages"] = { "python": {}, diff --git a/snippet_fmt/formatters.py b/snippet_fmt/formatters.py index 55c6039..5964505 100644 --- a/snippet_fmt/formatters.py +++ b/snippet_fmt/formatters.py @@ -32,7 +32,7 @@ import os from configparser import ConfigParser from io import StringIO -from typing import Any, Callable, Optional, TypeVar +from typing import Any, Optional # 3rd party import dom_toml @@ -40,14 +40,14 @@ import formate from domdf_python_tools.paths import PathPlus -__all__ = [ +__all__ = ( "Formatter", "format_toml", "format_ini", "format_json", "format_python", "noformat", - ] + ) # 3rd party from typing_extensions import Protocol @@ -137,6 +137,8 @@ def format_ini(code: str, **config) -> str: :param \*\*config: The language-specific configuration. :returns: The original code unchanged. + + .. latex:clearpage:: """ parser = ConfigParser() diff --git a/tests/example.rst b/tests/example.rst index a66882d..ad841f6 100644 --- a/tests/example.rst +++ b/tests/example.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt.py b/tests/test_snippet_fmt.py index 8e3646e..e844883 100644 --- a/tests/test_snippet_fmt.py +++ b/tests/test_snippet_fmt.py @@ -1,6 +1,5 @@ # stdlib -import re -from typing import Dict, List, Union, no_type_check +from typing import Dict, Iterator, List, Union, no_type_check # 3rd party import dom_toml @@ -8,6 +7,7 @@ from _pytest.capture import CaptureResult from coincidence import AdvancedDataRegressionFixture, AdvancedFileRegressionFixture from coincidence.params import param +from coincidence.selectors import max_version, min_version from consolekit.terminal_colours import strip_ansi from consolekit.testing import CliRunner, Result from domdf_python_tools.paths import PathPlus, TemporaryPathPlus, in_directory @@ -53,15 +53,33 @@ {"ini": {"reformat": True}, "python": {"reformat": False}}, id="ini_python_false", ), - pytest.param({"JSON": {"reformat": True}}, id="json_caps"), - pytest.param({"json": {"reformat": True}}, id="json"), + pytest.param({"JSON": {"reformat": True}}, id="json_caps", marks=max_version("3.12")), + pytest.param( + {"JSON": {"reformat": True}}, + id="json_caps_new_error_msg", + marks=min_version("3.13"), + ), + pytest.param({"json": {"reformat": True}}, id="json", marks=max_version("3.12")), + pytest.param({"json": {"reformat": True}}, id="json_new_error_msg", marks=min_version("3.13")), pytest.param( {"JSON": {"reformat": True, "indent": 2}, "json": {"reformat": True}}, id="json_caps_indent", + marks=max_version("3.12"), + ), + pytest.param( + {"JSON": {"reformat": True, "indent": 2}, "json": {"reformat": True}}, + id="json_caps_indent_new_error_msg", + marks=min_version("3.13"), ), pytest.param( {"json": {"reformat": True, "indent": 2}, "JSON": {"reformat": True}}, id="json_indent", + marks=max_version("3.12"), + ), + pytest.param( + {"json": {"reformat": True, "indent": 2}, "JSON": {"reformat": True}}, + id="json_indent_new_error_msg", + marks=min_version("3.13"), ), ] ) @@ -69,7 +87,7 @@ @pytest.fixture() -def custom_entry_point(monkeypatch): +def custom_entry_point(monkeypatch) -> Iterator: with TemporaryPathPlus() as tmpdir: monkeypatch.syspath_prepend(str(tmpdir)) @@ -114,6 +132,7 @@ def test_snippet_fmt( advanced_file_regression.check_file(tmp_pathplus / filename) check_out(capsys.readouterr(), tmp_pathplus, advanced_data_regression) + @pytest.mark.usefixtures("custom_entry_point") @filenames def test_snippet_fmt_custom_entry_point( self, @@ -122,7 +141,6 @@ def test_snippet_fmt_custom_entry_point( advanced_file_regression: AdvancedFileRegressionFixture, advanced_data_regression: AdvancedDataRegressionFixture, capsys, - custom_entry_point ): languages = {"python3": {"reformat": True}} @@ -191,7 +209,7 @@ def check_out( result: Union[Result, CaptureResult[str]], tmpdir: PathPlus, advanced_data_regression: AdvancedDataRegressionFixture, - ): + ) -> None: if hasattr(result, "stdout"): stdout = result.stdout diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_custom_entry_point_example_rst_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_custom_entry_point_example_rst_.rst index 16dd791..90a6bf1 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_custom_entry_point_example_rst_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_custom_entry_point_example_rst_.rst @@ -119,3 +119,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_0_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_4_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_5_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_5_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_6_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_6_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_7_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_empty_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_0_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_4_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_5_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_5_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_6_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_6_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_7_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_0_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_4_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_5_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_5_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_6_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_6_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_7_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_caps_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_0_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_4_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_5_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_5_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_6_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_6_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_7_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_ini_python_false_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_0_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_4_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_5_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_5_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_6_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_6_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_7_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_0_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_4_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_5_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_5_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_6_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_6_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_7_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_0_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_4_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_5_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_5_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_6_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_6_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_7_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_0_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_1_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_2_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_3_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_4_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_5_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_6_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_indent_new_error_msg_7_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_0_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_1_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_2_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_3_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_4_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_5_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_6_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.yml new file mode 100644 index 0000000..c8c826f --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_caps_new_error_msg_7_.yml @@ -0,0 +1,6 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.rst index 4ac759c..5ebbed8 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.rst @@ -133,3 +133,17 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.yml index 1f9153e..39cd0be 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_0_.yml @@ -17,5 +17,16 @@ out: - '' - '' - ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" - '' - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.rst index 4ac759c..5ebbed8 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.rst @@ -133,3 +133,17 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.yml index 1f9153e..39cd0be 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_4_.yml @@ -17,5 +17,16 @@ out: - '' - '' - ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" - '' - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.rst index 4ac759c..5ebbed8 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.rst @@ -133,3 +133,17 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.yml index 1f9153e..39cd0be 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_5_.yml @@ -17,5 +17,16 @@ out: - '' - '' - ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" - '' - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.rst index 4ac759c..5ebbed8 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.rst @@ -133,3 +133,17 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.yml index 1f9153e..39cd0be 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_6_.yml @@ -17,5 +17,16 @@ out: - '' - '' - ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" - '' - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.rst index 4ac759c..5ebbed8 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.rst @@ -133,3 +133,17 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.yml index 1f9153e..39cd0be 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_7_.yml @@ -17,5 +17,16 @@ out: - '' - '' - ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" - '' - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.rst new file mode 100644 index 0000000..5ebbed8 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.rst @@ -0,0 +1,149 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.yml new file mode 100644 index 0000000..742b675 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_0_.yml @@ -0,0 +1,32 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- "--- .../example.rst\t(original)" +- "+++ .../example.rst\t(reformatted)" +- '@@ -118,7 +118,10 @@' +- '' +- ' .. code-block:: json' +- '' +- "-\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t{" +- "+\t \"key\": \"value\"," +- "+\t \"key2\": \"value2\"" +- "+\t}" +- '' +- '' +- ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" +- '' +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_1_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_2_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_3_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.rst new file mode 100644 index 0000000..5ebbed8 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.rst @@ -0,0 +1,149 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.yml new file mode 100644 index 0000000..742b675 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_4_.yml @@ -0,0 +1,32 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- "--- .../example.rst\t(original)" +- "+++ .../example.rst\t(reformatted)" +- '@@ -118,7 +118,10 @@' +- '' +- ' .. code-block:: json' +- '' +- "-\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t{" +- "+\t \"key\": \"value\"," +- "+\t \"key2\": \"value2\"" +- "+\t}" +- '' +- '' +- ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" +- '' +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.rst new file mode 100644 index 0000000..5ebbed8 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.rst @@ -0,0 +1,149 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.yml new file mode 100644 index 0000000..742b675 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_5_.yml @@ -0,0 +1,32 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- "--- .../example.rst\t(original)" +- "+++ .../example.rst\t(reformatted)" +- '@@ -118,7 +118,10 @@' +- '' +- ' .. code-block:: json' +- '' +- "-\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t{" +- "+\t \"key\": \"value\"," +- "+\t \"key2\": \"value2\"" +- "+\t}" +- '' +- '' +- ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" +- '' +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.rst new file mode 100644 index 0000000..5ebbed8 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.rst @@ -0,0 +1,149 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.yml new file mode 100644 index 0000000..742b675 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_6_.yml @@ -0,0 +1,32 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- "--- .../example.rst\t(original)" +- "+++ .../example.rst\t(reformatted)" +- '@@ -118,7 +118,10 @@' +- '' +- ' .. code-block:: json' +- '' +- "-\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t{" +- "+\t \"key\": \"value\"," +- "+\t \"key2\": \"value2\"" +- "+\t}" +- '' +- '' +- ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" +- '' +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.rst new file mode 100644 index 0000000..5ebbed8 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.rst @@ -0,0 +1,149 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + { + "key": "value", + "key2": "value2" + } + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.yml new file mode 100644 index 0000000..742b675 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_indent_new_error_msg_7_.yml @@ -0,0 +1,32 @@ +err: +- '.../example.rst:112: JSONDecodeError: Illegal trailing comma before end of object: + line 3 column 18 (char 36)' +- '' +out: +- "--- .../example.rst\t(original)" +- "+++ .../example.rst\t(reformatted)" +- '@@ -118,7 +118,10 @@' +- '' +- ' .. code-block:: json' +- '' +- "-\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t{" +- "+\t \"key\": \"value\"," +- "+\t \"key2\": \"value2\"" +- "+\t}" +- '' +- '' +- ' .. code-block:: bash' +- '@@ -135,7 +138,10 @@' +- '' +- " \t.. code-block:: json" +- '' +- "-\t\t{\"key\": \"value\", \"key2\": \"value2\"}" +- "+\t\t{" +- "+\t\t \"key\": \"value\"," +- "+\t\t \"key2\": \"value2\"" +- "+\t\t}" +- '' +- " \t.. code-block:: bash" +- '' +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_0_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_1_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_2_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_3_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_4_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_5_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_6_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.rst new file mode 100644 index 0000000..ad841f6 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.rst @@ -0,0 +1,143 @@ + +.. code-block:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: python3 + + for item in [a,b,c] : + if item: print(item) + + +.. code-cell:: python3 + :count: 1 + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. sourcecode:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. parsed-literal:: python + + print ( 'Hello World' + + ) + + for item in [a,b,c] : + if item: print(item) + + +.. code-block:: toml + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code-block:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = {file = "LICENSE"} + + +.. code:: TOML + + [project] + + + name = 'my-project' + + + version="1.2.3" + license = { + file = "LICENSE", + } + +.. sourcecode:: toml + + [project] + name = 'my-project + + +.. code-block:: JSON + + { + "key": "value", + "key2": "value2", + } + +.. code-block:: json + + {"key": "value", "key2": "value2"} + + +.. code-block:: bash + + echo "Hello World" + + +.. code:: YAML + + name: my-project + version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.yml new file mode 100644 index 0000000..46fdb94 --- /dev/null +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_json_new_error_msg_7_.yml @@ -0,0 +1,4 @@ +err: +- '' +out: +- '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_0_.rst index 94b43f6..05d5f3f 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_2_.rst index bb33f48..76f1d18 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_2_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_4_.rst index 94b43f6..05d5f3f 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_5_.rst index adfc23c..d037230 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_5_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_6_.rst index adfc23c..d037230 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_6_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_7_.rst index 94b43f6..05d5f3f 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_0_.rst index 94b43f6..05d5f3f 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_0_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_2_.rst index bb33f48..76f1d18 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_2_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.yml index 7c2bc50..f5719f3 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_3_.yml @@ -1,6 +1,5 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_4_.rst index 94b43f6..05d5f3f 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_4_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_5_.rst index adfc23c..d037230 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_5_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.rst index adfc23c..d037230 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.yml index d280688..d7c6905 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_6_.yml @@ -1,6 +1,5 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - "--- .../example.rst\t(original)" diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_7_.rst index 94b43f6..05d5f3f 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python3_toml_false_7_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_0_.rst index 010d91b..144c36c 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_0_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_1_.rst index cbcff65..7686862 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_1_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_3_.rst index f345f30..263db68 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_3_.rst @@ -129,3 +129,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_4_.rst index b904b0c..23f4fc1 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_4_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_5_.rst index b904b0c..23f4fc1 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_5_.rst @@ -128,3 +128,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_6_.rst index ccdd5cb..0d0b886 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_6_.rst @@ -127,3 +127,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_7_.rst index 0a01458..44a5a49 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_python_7_.rst @@ -127,3 +127,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst index 666b791..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML @@ -128,3 +126,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_0_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.yml index 7c2bc50..f5719f3 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_3_.yml @@ -1,6 +1,5 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst index 666b791..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML @@ -128,3 +126,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_4_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst index 666b791..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML @@ -128,3 +126,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_5_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst index 666b791..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML @@ -128,3 +126,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.yml index 2557166..0c6281d 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_6_.yml @@ -1,25 +1,23 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst index 666b791..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML @@ -128,3 +126,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_7_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst index 8a1fa19..aec9526 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.rst @@ -83,9 +83,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code:: TOML @@ -128,3 +126,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.yml index 2f8e848..4407458 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_0_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -81,13 +81,11 @@' +- '@@ -81,13 +81,9 @@' - ' .. code-block:: TOML' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.yml index 3533983..42fb6b7 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_1_.yml @@ -1,6 +1,6 @@ err: -- '.../example.rst:93: TomlDecodeError: Key name found without value. Reached end - of line. (line 10 column 2 char 86)' +- '.../example.rst:93: TOMLDecodeError: Invalid initial character for a key part (at + line 8, column 12)' - '' out: - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst index 8a1fa19..aec9526 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.rst @@ -83,9 +83,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code:: TOML @@ -128,3 +126,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.yml index 3cce36a..9dc4395 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_4_.yml @@ -1,25 +1,24 @@ err: -- '.../example.rst:93: TomlDecodeError: Key name found without value. Reached end - of line. (line 10 column 2 char 86)' +- '.../example.rst:93: TOMLDecodeError: Invalid initial character for a key part (at + line 8, column 12)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -81,13 +81,11 @@' +- '@@ -81,13 +81,9 @@' - ' .. code-block:: TOML' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst index 8a1fa19..aec9526 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.rst @@ -83,9 +83,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code:: TOML @@ -128,3 +126,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.yml index 3cce36a..9dc4395 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_5_.yml @@ -1,25 +1,24 @@ err: -- '.../example.rst:93: TomlDecodeError: Key name found without value. Reached end - of line. (line 10 column 2 char 86)' +- '.../example.rst:93: TOMLDecodeError: Invalid initial character for a key part (at + line 8, column 12)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -81,13 +81,11 @@' +- '@@ -81,13 +81,9 @@' - ' .. code-block:: TOML' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst index 8a1fa19..aec9526 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.rst @@ -83,9 +83,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code:: TOML @@ -128,3 +126,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.yml index 3cce36a..9dc4395 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_6_.yml @@ -1,25 +1,24 @@ err: -- '.../example.rst:93: TomlDecodeError: Key name found without value. Reached end - of line. (line 10 column 2 char 86)' +- '.../example.rst:93: TOMLDecodeError: Invalid initial character for a key part (at + line 8, column 12)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -81,13 +81,11 @@' +- '@@ -81,13 +81,9 @@' - ' .. code-block:: TOML' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst index 8a1fa19..aec9526 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.rst @@ -83,9 +83,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code:: TOML @@ -128,3 +126,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.yml index 3cce36a..9dc4395 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_caps_7_.yml @@ -1,25 +1,24 @@ err: -- '.../example.rst:93: TomlDecodeError: Key name found without value. Reached end - of line. (line 10 column 2 char 86)' +- '.../example.rst:93: TOMLDecodeError: Invalid initial character for a key part (at + line 8, column 12)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -81,13 +81,11 @@' +- '@@ -81,13 +81,9 @@' - ' .. code-block:: TOML' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst index 666b791..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML @@ -128,3 +126,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_0_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_1_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_1_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_1_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_1_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_2_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_2_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_2_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_2_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.rst index a66882d..ad841f6 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.rst @@ -130,3 +130,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.yml index 7c2bc50..f5719f3 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_3_.yml @@ -1,6 +1,5 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - '' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst index 666b791..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML @@ -128,3 +126,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_4_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst index 666b791..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML @@ -128,3 +126,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_5_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst index 666b791..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML @@ -128,3 +126,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.yml index 2557166..0c6281d 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_6_.yml @@ -1,25 +1,23 @@ err: -- '.../example.rst:106: TomlDecodeError: Unbalanced quotes (line 2 column 19 char - 28)' +- '.../example.rst:106: TOMLDecodeError: Expected "''" (at end of document)' - '' out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst index 666b791..c1474bc 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.rst @@ -71,9 +71,7 @@ [project] name = "my-project" version = "1.2.3" - - [project.license] - file = "LICENSE" + license = { file = "LICENSE" } .. code-block:: TOML @@ -128,3 +126,14 @@ name: my-project version: 1.2.3 + +.. a-directive:: + + .. code-block:: json + + {"key": "value", "key2": "value2"} + + .. code-block:: bash + + $ conda config --add channels https://conda.anaconda.org/conda-forge + $ conda config --add channels https://conda.anaconda.org/domdfcoding diff --git a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.yml b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.yml index 81a7cc4..e00db4e 100644 --- a/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.yml +++ b/tests/test_snippet_fmt_/test_snippet_fmt_example_rst_toml_python_false_7_.yml @@ -3,21 +3,20 @@ err: out: - "--- .../example.rst\t(original)" - "+++ .../example.rst\t(reformatted)" -- '@@ -69,13 +69,11 @@' +- '@@ -69,13 +69,9 @@' - ' .. code-block:: toml' - '' - " \t[project]" -- "+\tname = \"my-project\"" -- "+\tversion = \"1.2.3\"" -- '' +- '-' - '-' - "-\tname = 'my-project'" - '-' - '-' - "-\tversion=\"1.2.3\"" - "-\tlicense = {file = \"LICENSE\"}" -- "+\t[project.license]" -- "+\tfile = \"LICENSE\"" +- "+\tname = \"my-project\"" +- "+\tversion = \"1.2.3\"" +- "+\tlicense = { file = \"LICENSE\" }" - '' - '' - ' .. code-block:: TOML' diff --git a/tox.ini b/tox.ini index 83db186..f4834c6 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 @@ -17,32 +23,40 @@ [tox] envlist = - py36-click{7,8} py37-click{7,8} py38-click{7,8} py39-click{7,8} - py310-dev-click{7,8} + py310-click{7,8} + py311-click{7,8} + py312-click{7,8} + py313-click{7,8} 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-click{7,8} py37-click{7,8} py38-click{7,8} py39-click{7,8} - py310-dev-click{7,8} + py310-click{7,8} + py311-click{7,8} + py312-click{7,8} + py313-click{7,8} qa = mypy, lint -cov = py36-click7, coverage +cov = py39-click7, coverage [testenv] -setenv = PYTHONDEVMODE = 1 +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 + SETUPTOOLS_USE_DISTUTILS=stdlib deps = -r{toxinidir}/tests/requirements.txt click7: click~=7.0 @@ -51,65 +65,99 @@ commands = python --version python -m pytest --cov=snippet_fmt -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:docs] setenv = SHOW_TODOS = 1 +passenv = SPHINX_BUILDER basepython = python3.8 -pip_version = pip>=21 changedir = {toxinidir}/doc-source deps = -r{toxinidir}/doc-source/requirements.txt commands = sphinx-build -M {env:SPHINX_BUILDER:html} . ./build {posargs} [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>=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-noqa>=1.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 snippet_fmt tests --allow-toolbox {posargs} +[testenv:perflint] +basepython = python3.9 +changedir = {toxinidir} +ignore_errors = True +skip_install = True +deps = perflint +commands = python3 -m perflint snippet_fmt {posargs} + [testenv:mypy] -basepython = python3.6 +basepython = python3.9 ignore_errors = True changedir = {toxinidir} deps = - mypy==0.910 + mypy==1.16 -r{toxinidir}/tests/requirements.txt commands = mypy snippet_fmt tests {posargs} [testenv:pyup] -basepython = python3.6 +basepython = python3.9 skip_install = True ignore_errors = True changedir = {toxinidir} @@ -117,7 +165,7 @@ deps = pyupgrade-directories commands = pyup_dirs snippet_fmt tests --py36-plus --recursive [testenv:coverage] -basepython = python3.6 +basepython = python3.9 skip_install = True ignore_errors = True whitelist_externals = /bin/bash @@ -125,6 +173,7 @@ passenv = COV_PYTHON_VERSION COV_PLATFORM COV_PYTHON_IMPLEMENTATION + * changedir = {toxinidir} deps = coverage>=5 @@ -136,7 +185,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 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 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 +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 @@ -153,20 +202,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 = 95 +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] @@ -177,3 +231,20 @@ package = snippet_fmt [pytest] addopts = --color yes --durations 25 timeout = 300 +filterwarnings = + error + ignore:lib2to3 package is deprecated and may not be able to parse Python 3.10+:DeprecationWarning + ignore:lib2to3 package is deprecated and may not be able to parse Python 3.10+:PendingDeprecationWarning + +[testenv:py312-click{7,8}] +download = True +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 + +[testenv:py313-click{7,8}] +download = True +setenv = + PYTHONDEVMODE=1 + PIP_DISABLE_PIP_VERSION_CHECK=1 + UNSAFE_PYO3_SKIP_VERSION_CHECK=1