pax_global_header00006660000000000000000000000064145273505300014516gustar00rootroot0000000000000052 comment=f95ba6705adffa931520b262b83cc6d064f19505 dict2css-0.3.0.post1/000077500000000000000000000000001452735053000143015ustar00rootroot00000000000000dict2css-0.3.0.post1/.bumpversion.cfg000066400000000000000000000010021452735053000174020ustar00rootroot00000000000000[bumpversion] current_version = 0.3.0.post1 commit = True tag = True [bumpversion:file:repo_helper.yml] [bumpversion:file:README.rst] [bumpversion:file:doc-source/index.rst] [bumpversion:file:dict2css/__init__.py] search = : str = "{current_version}" replace = : str = "{new_version}" [bumpversion:file:pyproject.toml] search = version = "{current_version}" replace = version = "{new_version}" [bumpversion:file:.github/workflows/conda_ci.yml] search = ={current_version}=py_1 replace = ={new_version}=py_1 dict2css-0.3.0.post1/.dependabot/000077500000000000000000000000001452735053000164645ustar00rootroot00000000000000dict2css-0.3.0.post1/.dependabot/config.yml000066400000000000000000000003101452735053000204460ustar00rootroot00000000000000# 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 dict2css-0.3.0.post1/.github/000077500000000000000000000000001452735053000156415ustar00rootroot00000000000000dict2css-0.3.0.post1/.github/ISSUE_TEMPLATE/000077500000000000000000000000001452735053000200245ustar00rootroot00000000000000dict2css-0.3.0.post1/.github/ISSUE_TEMPLATE/bug_report.md000066400000000000000000000022311452735053000225140ustar00rootroot00000000000000--- name: Bug report about: Create a report to help us improve labels: bug assignees: domdfcoding --- ## Description ## Steps to Reproduce 1. 2. 3. ## Actual result: ## Expected result: ## Reproduces how often: ## Version * Operating System: * Python: * dict2css: ## Installation source ## Other Additional Information: dict2css-0.3.0.post1/.github/ISSUE_TEMPLATE/feature_request.md000066400000000000000000000012141452735053000235470ustar00rootroot00000000000000--- name: Feature request about: Suggest an idea for this project labels: "enhancement" assignees: domdfcoding --- ## Description ## Version * Operating System: * Python: * dict2css: ## Other Additional Information: dict2css-0.3.0.post1/.github/auto_assign.yml000066400000000000000000000003471452735053000207040ustar00rootroot00000000000000# This file is managed by 'repo_helper'. Don't edit it directly. --- addReviewers: true addAssignees: true reviewers: - domdfcoding numberOfReviewers: 0 # more settings at https://github.com/marketplace/actions/auto-assign-action dict2css-0.3.0.post1/.github/dependabot.yml000066400000000000000000000002771452735053000204770ustar00rootroot00000000000000# This file is managed by 'repo_helper'. Don't edit it directly. --- version: 2 updates: - package-ecosystem: pip directory: / schedule: interval: weekly reviewers: - domdfcoding dict2css-0.3.0.post1/.github/milestones.py000077500000000000000000000012401452735053000203750ustar00rootroot00000000000000#!/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")) dict2css-0.3.0.post1/.github/stale.yml000066400000000000000000000040211452735053000174710ustar00rootroot00000000000000# This file is managed by 'repo_helper'. Don't edit it directly. # Configuration for probot-stale - https://github.com/probot/stale --- # Number of days of inactivity before an Issue or Pull Request becomes stale 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: false # Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) onlyLabels: [] # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable exemptLabels: - pinned - security - "[Status] Maybe Later" # Set to true to ignore issues in a project (defaults to false) exemptProjects: false # Set to true to ignore issues in a milestone (defaults to false) exemptMilestones: false # Set to true to ignore issues with an assignee (defaults to false) exemptAssignees: false # Label to use when marking as stale staleLabel: stale # Comment to post when marking as stale. Set to `false` to disable 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: > # Your comment here. # Comment to post when closing a stale Issue or Pull Request. # closeComment: > # Your comment here. # Limit the number of actions per hour, from 1-30. Default is 30 limitPerRun: 30 # Limit to only `issues` or `pulls` # only: issues # Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': # pulls: # daysUntilStale: 30 # markComment: > # This pull request 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. # issues: # exemptLabels: # - confirmed dict2css-0.3.0.post1/.github/workflows/000077500000000000000000000000001452735053000176765ustar00rootroot00000000000000dict2css-0.3.0.post1/.github/workflows/conda_ci.yml000066400000000000000000000036251452735053000221660ustar00rootroot00000000000000# This file is managed by 'repo_helper'. Don't edit it directly. --- name: Conda Tests on: push: branches: ["master"] permissions: contents: read jobs: tests: name: "Conda" runs-on: ubuntu-22.04 defaults: run: shell: bash -l {0} steps: - name: Checkout 🛎️ uses: "actions/checkout@v3" - name: Setup Python 🐍 uses: "actions/setup-python@v4" with: python-version: "3.8" - name: Setup Conda uses: conda-incubator/setup-miniconda@v2 with: activate-environment: env conda-build-version: 3.23.3 python-version: "3.8" miniforge-variant: Mambaforge - name: Install dependencies 🔧 run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade "whey-conda" "whey" # $CONDA is an environment variable pointing to the root of the miniconda directory $CONDA/bin/conda update -n base conda $CONDA/bin/conda config --add channels conda-forge $CONDA/bin/conda config --add channels domdfcoding - name: "Build and index channel" run: | python -m whey --builder whey_conda --out-dir conda-bld/noarch $CONDA/bin/conda index ./conda-bld || exit 1 - name: "Search for package" run: | $CONDA/bin/conda search -c file://$(pwd)/conda-bld dict2css $CONDA/bin/conda search -c file://$(pwd)/conda-bld --override-channels dict2css - name: "Install package" run: | $CONDA/bin/conda install -c file://$(pwd)/conda-bld dict2css=0.3.0.post1=py_1 -y || exit 1 - name: "Run Tests" run: | rm -rf dict2css $CONDA/bin/conda install pytest coincidence || exit 1 pip install -r tests/requirements.txt pytest tests/ dict2css-0.3.0.post1/.github/workflows/docs_test_action.yml000066400000000000000000000015501452735053000237460ustar00rootroot00000000000000# This file is managed by 'repo_helper'. Don't edit it directly. --- name: "Docs Check" on: push: branches-ignore: - 'repo-helper-update' - 'pre-commit-ci-update-config' - 'imgbot' pull_request: permissions: contents: read jobs: docs: runs-on: ubuntu-latest steps: - name: Checkout 🛎️ uses: "actions/checkout@v3" - name: Check for changed files uses: dorny/paths-filter@v2 id: changes with: list-files: "json" filters: | code: - '!tests/**' - name: Install and Build 🔧 uses: sphinx-toolbox/sphinx-action@sphinx-3.3.1 if: steps.changes.outputs.code == 'true' with: pre-build-command: python -m pip install tox docs-folder: "doc-source/" build-command: "tox -e docs -- -W " dict2css-0.3.0.post1/.github/workflows/flake8.yml000066400000000000000000000023361452735053000215770ustar00rootroot00000000000000# This file is managed by 'repo_helper'. Don't edit it directly. --- name: Flake8 on: push: branches-ignore: - 'repo-helper-update' - 'pre-commit-ci-update-config' - 'imgbot' pull_request: permissions: contents: read jobs: Run: name: "Flake8" runs-on: "ubuntu-20.04" steps: - name: Checkout 🛎️ uses: "actions/checkout@v3" - name: Check for changed files uses: dorny/paths-filter@v2 id: changes with: list-files: "json" filters: | code: - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)' - name: Setup Python 🐍 if: steps.changes.outputs.code == 'true' uses: "actions/setup-python@v4" with: python-version: "3.8" - name: Install dependencies 🔧 if: steps.changes.outputs.code == 'true' run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel python -m pip install tox~=3.0 - name: "Run Flake8" if: steps.changes.outputs.code == 'true' run: "python -m tox -e lint -s false -- --format github" dict2css-0.3.0.post1/.github/workflows/mypy.yml000066400000000000000000000024501452735053000214200ustar00rootroot00000000000000# This file is managed by 'repo_helper'. Don't edit it directly. --- name: mypy on: push: branches-ignore: - 'repo-helper-update' - 'pre-commit-ci-update-config' - 'imgbot' pull_request: permissions: contents: read jobs: Run: name: "mypy / ${{ matrix.os }}" runs-on: ${{ matrix.os }} strategy: matrix: os: ['ubuntu-20.04', 'windows-2019'] fail-fast: false steps: - name: Checkout 🛎️ uses: "actions/checkout@v3" - name: Check for changed files uses: dorny/paths-filter@v2 id: changes with: list-files: "json" filters: | code: - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)' - name: Setup Python 🐍 if: steps.changes.outputs.code == 'true' uses: "actions/setup-python@v4" with: python-version: "3.8" - name: Install dependencies 🔧 run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0 - name: "Run mypy" if: steps.changes.outputs.code == 'true' run: "python -m tox -e mypy -s false" dict2css-0.3.0.post1/.github/workflows/octocheese.yml000066400000000000000000000006131452735053000225420ustar00rootroot00000000000000# This file is managed by 'repo_helper'. Don't edit it directly. --- name: "GitHub Releases" on: schedule: - cron: 0 12 * * * jobs: Run: runs-on: ubuntu-latest steps: - uses: domdfcoding/octocheese@master with: pypi_name: "dict2css" env: GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} if: startsWith(github.ref, 'refs/tags/') != true dict2css-0.3.0.post1/.github/workflows/python_ci.yml000066400000000000000000000060201452735053000224130ustar00rootroot00000000000000# This file is managed by 'repo_helper'. Don't edit it directly. --- name: Windows on: push: branches-ignore: - 'repo-helper-update' - 'pre-commit-ci-update-config' - 'imgbot' pull_request: permissions: actions: write issues: write contents: read jobs: tests: name: "windows-2019 / Python ${{ matrix.config.python-version }}" runs-on: "windows-2019" continue-on-error: ${{ matrix.config.experimental }} env: USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.1,pypy-3.6,pypy-3.7,pypy-3.8,pypy-3.9' strategy: fail-fast: False matrix: config: - {python-version: "3.6", testenvs: "py36,build", experimental: False} - {python-version: "3.7", testenvs: "py37,build", experimental: False} - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - {python-version: "3.10", testenvs: "py310,build", experimental: False} - {python-version: "3.11", testenvs: "py311,build", experimental: False} - {python-version: "3.12", testenvs: "py312,build", experimental: False} - {python-version: "3.13.0-alpha.1", testenvs: "py313-dev,build", experimental: True} - {python-version: "pypy-3.6", testenvs: "pypy36", experimental: False} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: False} - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: False} - {python-version: "pypy-3.9", testenvs: "pypy39,build", experimental: True} steps: - name: Checkout 🛎️ uses: "actions/checkout@v3" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true uses: dorny/paths-filter@v2 id: changes with: list-files: "json" filters: | code: - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)' - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} uses: "actions/setup-python@v4" with: python-version: "${{ matrix.config.python-version }}" - name: Install dependencies 🔧 if: steps.setup-python.outcome == 'success' run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade tox~=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@v3 if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" path: .coverage dict2css-0.3.0.post1/.github/workflows/python_ci_linux.yml000066400000000000000000000173761452735053000236520ustar00rootroot00000000000000# This file is managed by 'repo_helper'. Don't edit it directly. --- name: Linux on: push: branches-ignore: - 'repo-helper-update' - 'pre-commit-ci-update-config' - 'imgbot' tags: - '*' pull_request: permissions: actions: write issues: write contents: read jobs: tests: name: "ubuntu-20.04 / Python ${{ matrix.config.python-version }}" runs-on: "ubuntu-20.04" continue-on-error: ${{ matrix.config.experimental }} env: USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.1,pypy-3.6,pypy-3.7,pypy-3.8,pypy-3.9' strategy: fail-fast: False matrix: config: - {python-version: "3.6", testenvs: "py36,build", experimental: False} - {python-version: "3.7", testenvs: "py37,build", experimental: False} - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - {python-version: "3.10", testenvs: "py310,build", experimental: False} - {python-version: "3.11", testenvs: "py311,build", experimental: False} - {python-version: "3.12", testenvs: "py312,build", experimental: False} - {python-version: "3.13.0-alpha.1", testenvs: "py313-dev,build", experimental: True} - {python-version: "pypy-3.6", testenvs: "pypy36,build", experimental: False} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: False} - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: False} - {python-version: "pypy-3.9", testenvs: "pypy39,build", experimental: True} steps: - name: Checkout 🛎️ uses: "actions/checkout@v3" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true uses: dorny/paths-filter@v2 id: changes with: list-files: "json" filters: | code: - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)' - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} uses: "actions/setup-python@v4" with: python-version: "${{ matrix.config.python-version }}" - name: Install dependencies 🔧 if: steps.setup-python.outcome == 'success' run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade tox~=3.0 virtualenv!=20.16.0 python -m pip install --upgrade coverage_pyver_pragma - 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@v3 if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" path: .coverage Coverage: needs: tests runs-on: "ubuntu-20.04" steps: - name: Checkout 🛎️ uses: "actions/checkout@v3" - name: Setup Python 🐍 uses: "actions/setup-python@v4" with: python-version: 3.8 - name: Install dependencies 🔧 run: | python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade "coveralls>=3.0.0" coverage_pyver_pragma - name: "Download Coverage 🪂" uses: actions/download-artifact@v3 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 🚀" if: ${{ steps.show.outcome != 'failure' }} uses: actions/upload-artifact@v3 with: name: "combined-coverage" path: .coverage - name: "Upload Combined Coverage to Coveralls" if: ${{ steps.show.outcome != 'failure' }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | coveralls --service=github Deploy: needs: tests runs-on: "ubuntu-20.04" steps: - name: Checkout 🛎️ uses: "actions/checkout@v3" if: startsWith(github.ref, 'refs/tags/') - name: Setup Python 🐍 uses: "actions/setup-python@v4" if: startsWith(github.ref, 'refs/tags/') with: python-version: 3.8 - name: Install dependencies 🔧 if: startsWith(github.ref, 'refs/tags/') run: | python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade tox~=3.0 - name: Build distributions 📦 if: startsWith(github.ref, 'refs/tags/') run: | tox -e build - name: Upload distribution to PyPI 🚀 if: startsWith(github.ref, 'refs/tags/') uses: pypa/gh-action-pypi-publish@v1.4.2 with: 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 }} Conda: needs: deploy runs-on: ubuntu-22.04 if: startsWith(github.ref, 'refs/tags/') || (startsWith(github.event.head_commit.message, 'Bump version') != true) steps: - name: Checkout 🛎️ uses: "actions/checkout@v3" - name: Setup Python 🐍 uses: "actions/setup-python@v4" with: python-version: 3.8 - name: Setup Conda uses: conda-incubator/setup-miniconda@v2 with: activate-environment: env conda-build-version: 3.23.3 python-version: "3.8" miniforge-variant: Mambaforge - name: Install dependencies 🔧 run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade "mkrecipe" "whey" # $CONDA is an environment variable pointing to the root of the miniconda directory $CONDA/bin/conda config --set always_yes yes --set changeps1 no $CONDA/bin/conda update -n base conda $CONDA/bin/conda info -a $CONDA/bin/conda config --add channels conda-forge $CONDA/bin/conda config --add channels domdfcoding $CONDA/bin/conda config --remove channels defaults - name: Build Conda Package 📦 run: | python -m mkrecipe --type wheel || exit 1 $CONDA/bin/conda build conda -c conda-forge -c domdfcoding --output-folder conda/dist - name: Deploy Conda Package 🚀 if: startsWith(github.ref, 'refs/tags/') run: | $CONDA/bin/conda config --set always_yes yes --set changeps1 no $CONDA/bin/conda install anaconda-client $CONDA/bin/conda info -a for f in conda/dist/noarch/dict2css-*.tar.bz2; do [ -e "$f" ] || continue echo "$f" conda install "$f" || exit 1 echo "Deploying to Anaconda.org..." $CONDA/bin/anaconda -t "$ANACONDA_TOKEN" upload "$f" || exit 1 echo "Successfully deployed to Anaconda.org." done env: ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} dict2css-0.3.0.post1/.github/workflows/python_ci_macos.yml000066400000000000000000000056631452735053000236110ustar00rootroot00000000000000# This file is managed by 'repo_helper'. Don't edit it directly. --- name: macOS on: push: branches-ignore: - 'repo-helper-update' - 'pre-commit-ci-update-config' - 'imgbot' pull_request: permissions: actions: write issues: write contents: read jobs: tests: name: "macos-latest / Python ${{ matrix.config.python-version }}" runs-on: "macos-latest" continue-on-error: ${{ matrix.config.experimental }} env: USING_COVERAGE: '3.6,3.7,3.8,3.9,3.10,3.11,3.12,3.13.0-alpha.1,pypy-3.7,pypy-3.8,pypy-3.9' strategy: fail-fast: False matrix: config: - {python-version: "3.6", testenvs: "py36,build", experimental: False} - {python-version: "3.7", testenvs: "py37,build", experimental: False} - {python-version: "3.8", testenvs: "py38,build", experimental: False} - {python-version: "3.9", testenvs: "py39,build", experimental: False} - {python-version: "3.10", testenvs: "py310,build", experimental: False} - {python-version: "3.11", testenvs: "py311,build", experimental: False} - {python-version: "3.12", testenvs: "py312,build", experimental: False} - {python-version: "3.13.0-alpha.1", testenvs: "py313-dev,build", experimental: True} - {python-version: "pypy-3.7", testenvs: "pypy37,build", experimental: False} - {python-version: "pypy-3.8", testenvs: "pypy38,build", experimental: False} - {python-version: "pypy-3.9", testenvs: "pypy39,build", experimental: True} steps: - name: Checkout 🛎️ uses: "actions/checkout@v3" - name: Check for changed files if: startsWith(github.ref, 'refs/tags/') != true uses: dorny/paths-filter@v2 id: changes with: list-files: "json" filters: | code: - '!(doc-source/**|CONTRIBUTING.rst|.imgbotconfig|.pre-commit-config.yaml|.pylintrc|.readthedocs.yml)' - name: Setup Python 🐍 id: setup-python if: ${{ steps.changes.outputs.code == 'true' || steps.changes.outcome == 'skipped' }} uses: "actions/setup-python@v4" with: python-version: "${{ matrix.config.python-version }}" - name: Install dependencies 🔧 if: steps.setup-python.outcome == 'success' run: | python -VV python -m site python -m pip install --upgrade pip setuptools wheel python -m pip install --upgrade tox~=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@v3 if: ${{ always() && steps.setup-python.outcome == 'success' }} with: name: "coverage-${{ matrix.config.python-version }}" path: .coverage dict2css-0.3.0.post1/.gitignore000066400000000000000000000020161452735053000162700ustar00rootroot00000000000000# This file is managed by 'repo_helper'. Don't edit it directly. __pycache__/ *.py[cod] *$py.class *.so .Python build/ develop-eggs/ dist/ downloads/ eggs/ .eggs/ lib/ lib64/ parts/ sdist/ var/ wheels/ *.egg-info/ .installed.cfg *.egg *.egg* *.manifest *.spec pip-log.txt pip-delete-this-directory.txt htmlcov/ .tox/ .coverage .coverage.* .cache nosetests.xml coverage.xml *.cover .hypothesis/ .pytest_cache/ cover/ *.mo *.pot *.log local_settings.py db.sqlite3 instance/ .webassets-cache .scrapy docs/_build/ doc/build target/ .ipynb_checkpoints .python-version celerybeat-schedule celerybeat.pid *.sage.py .env .venv env/ venv/ ENV/ env.bak/ venv.bak/ .spyderproject .spyproject .ropeproject /site .mypy_cache/ .dmypy.json dmypy.json *.iml *.ipr cmake-build-*/ .idea/**/mongoSettings.xml *.iws out/ atlassian-ide-plugin.xml com_crashlytics_export_strings.xml crashlytics.properties crashlytics-build.properties fabric.properties .idea build **/__pycache__ **/conda __pypackages__/ profile_default/ ipython_config.py Pipfile.lock .pyre/ dict2css-0.3.0.post1/.imgbotconfig000066400000000000000000000001151452735053000167460ustar00rootroot00000000000000{ "schedule": "weekly", "ignoredFiles": [ "**/*.svg" ] } dict2css-0.3.0.post1/.pre-commit-config.yaml000066400000000000000000000042411452735053000205630ustar00rootroot00000000000000# This file is managed by 'repo_helper'. Don't edit it directly. --- exclude: ^$ ci: autoupdate_schedule: quarterly repos: - repo: https://github.com/repo-helper/pyproject-parser rev: v0.9.0 hooks: - id: reformat-pyproject - repo: https://github.com/pre-commit/pre-commit-hooks rev: v3.4.0 hooks: - id: check-added-large-files - id: check-ast - id: fix-byte-order-marker - id: check-byte-order-marker - id: check-case-conflict - id: check-executables-have-shebangs - id: check-json - id: check-toml - id: check-yaml - id: check-merge-conflict - id: check-symlinks - id: check-vcs-permalinks - id: detect-private-key - id: trailing-whitespace - id: mixed-line-ending - id: end-of-file-fixer - repo: https://github.com/domdfcoding/pre-commit-hooks rev: v0.4.0 hooks: - id: requirements-txt-sorter args: - --allow-git - id: check-docstring-first exclude: ^(doc-source/conf|__pkginfo__|setup|tests/.*)\.py$ - id: bind-requirements - repo: https://github.com/domdfcoding/flake8-dunder-all rev: v0.3.0 hooks: - id: ensure-dunder-all files: ^dict2css/.*\.py$ - repo: https://github.com/domdfcoding/flake2lint rev: v0.4.2 hooks: - id: flake2lint - repo: https://github.com/pre-commit/pygrep-hooks rev: v1.10.0 hooks: - id: python-no-eval - id: rst-backticks - id: rst-directive-colons - id: rst-inline-touching-normal - repo: https://github.com/asottile/pyupgrade rev: v2.12.0 hooks: - id: pyupgrade args: - --py36-plus - --keep-runtime-typing - repo: https://github.com/Lucas-C/pre-commit-hooks rev: v1.5.1 hooks: - id: remove-crlf - id: forbid-crlf - repo: https://github.com/python-formate/snippet-fmt rev: v0.1.4 hooks: - id: snippet-fmt - repo: https://github.com/python-formate/formate rev: v0.5.0 hooks: - id: formate exclude: ^(doc-source/conf|__pkginfo__|setup)\.(_)?py$ - repo: https://github.com/domdfcoding/dep_checker rev: v0.7.1 hooks: - id: dep_checker args: - dict2css # Custom hooks can be added below this comment dict2css-0.3.0.post1/.pylintrc000066400000000000000000000346201452735053000161530ustar00rootroot00000000000000[MASTER] # Specify a configuration file. #rcfile= # Python code to execute, usually for sys.path manipulation such as # pygtk.require(). #init-hook= # Add files or directories to the blacklist. They should be base names, not # paths. ignore=CVS # Add files or directories matching the regex patterns to the blacklist. The # regex matches against base names, not paths. ignore-patterns= # Pickle collected data for later comparisons. persistent=yes # List of plugins (as comma separated values of python modules names) to load, # usually to register additional checkers. load-plugins= # Use multiple processes to speed up Pylint. jobs=1 # Allow loading of arbitrary C extensions. Extensions are imported into the # active Python interpreter and may run arbitrary code. unsafe-load-any-extension=no # A comma-separated list of package or module names from where C extensions may # be loaded. Extensions are loading into the active Python interpreter and may # run arbitrary code extension-pkg-whitelist= # Allow optimization of some AST trees. This will activate a peephole AST # optimizer, which will apply various small optimizations. For instance, it can # be used to obtain the result of joining multiple strings with the addition # operator. Joining a lot of strings can lead to a maximum recursion error in # Pylint and this flag can prevent that. It has one side effect, the resulting # AST will be different than the one from reality. This option is deprecated # and it will be removed in Pylint 2.0. optimize-ast=no [MESSAGES CONTROL] # Only show warnings with the listed confidence levels. Leave empty to show # all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED confidence= # Enable the message, report, category or checker with the given id(s). You can # either give multiple identifier separated by comma (,) or put this option # multiple time (only on the command line, not in the configuration file where # it should appear only once). See also the "--disable" option for examples. #enable= # Disable the message, report, category or checker with the given id(s). You # can either give multiple identifiers separated by comma (,) or put this # option multiple times (only on the command line, not in the configuration # file where it should appear only once).You can also use "--disable=all" to # disable everything first and then reenable specific checks. For example, if # you want to run only the similarities checker, you can use "--disable=all # --enable=similarities". If you want to run only the classes checker, but have # no Warning level messages displayed, use"--disable=all --enable=classes # --disable=W" disable=all enable=assert-on-tuple,astroid-error,bad-except-order,bad-inline-option,bad-option-value,bad-reversed-sequence,bare-except,binary-op-exception,boolean-datetime,catching-non-exception,cell-var-from-loop,confusing-with-statement,consider-merging-isinstance,consider-using-enumerate,consider-using-ternary,continue-in-finally,deprecated-pragma,django-not-available,duplicate-except,duplicate-key,eval-used,exec-used,expression-not-assigned,fatal,file-ignored,fixme,global-at-module-level,global-statement,global-variable-not-assigned,global-variable-undefined,http-response-with-content-type-json,http-response-with-json-dumps,invalid-all-object,invalid-characters-in-docstring,len-as-condition,literal-comparison,locally-disabled,locally-enabled,lost-exception,lowercase-l-suffix,misplaced-bare-raise,missing-kwoa,mixed-line-endings,model-has-unicode,model-missing-unicode,model-no-explicit-unicode,model-unicode-not-callable,multiple-imports,new-db-field-with-default,non-ascii-bytes-literals,nonexistent-operator,not-in-loop,notimplemented-raised,overlapping-except,parse-error,pointless-statement,pointless-string-statement,raising-bad-type,raising-non-exception,raw-checker-failed,redefine-in-handler,redefined-argument-from-local,redefined-builtin,redundant-content-type-for-json-response,reimported,relative-import,return-outside-function,simplifiable-if-statement,singleton-comparison,syntax-error,trailing-comma-tuple,trailing-newlines,unbalanced-tuple-unpacking,undefined-all-variable,undefined-loop-variable,unexpected-line-ending-format,unidiomatic-typecheck,unnecessary-lambda,unnecessary-pass,unnecessary-semicolon,unneeded-not,unpacking-non-sequence,unreachable,unrecognized-inline-option,used-before-assignment,useless-else-on-loop,using-constant-test,wildcard-import,yield-outside-function,useless-return [REPORTS] # Set the output format. Available formats are text, parseable, colorized, msvs # (visual studio) and html. You can also give a reporter class, eg # mypackage.mymodule.MyReporterClass. output-format=text # Put messages in a separate file for each module / package specified on the # command line instead of printing them on stdout. Reports (if any) will be # written in a file name "pylint_global.[txt|html]". This option is deprecated # and it will be removed in Pylint 2.0. files-output=no # Tells whether to display a full report or only the messages reports=no # Python expression which should return a note less than 10 (10 is the highest # note). You have access to the variables errors warning, statement which # respectively contain the number of errors / warnings messages and the total # number of statements analyzed. This is used by the global evaluation report # (RP0004). evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) # Template used to display messages. This is a python new-style format string # used to format the message information. See doc for all details #msg-template= [BASIC] # Good variable names which should always be accepted, separated by a comma good-names=i,j,k,ex,Run,_ # Bad variable names which should always be refused, separated by a comma bad-names=foo,bar,baz,toto,tutu,tata # Colon-delimited sets of names that determine each other's naming style when # the name regexes allow several styles. name-group= # Include a hint for the correct naming format with invalid-name include-naming-hint=no # List of decorators that produce properties, such as abc.abstractproperty. Add # to this list to register other decorators that produce valid properties. property-classes=abc.abstractproperty # Regular expression matching correct function names function-rgx=[a-z_][a-z0-9_]{2,30}$ # Naming hint for function names function-name-hint=[a-z_][a-z0-9_]{2,30}$ # Regular expression matching correct variable names variable-rgx=[a-z_][a-z0-9_]{2,30}$ # Naming hint for variable names variable-name-hint=[a-z_][a-z0-9_]{2,30}$ # Regular expression matching correct constant names const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ # Naming hint for constant names const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$ # Regular expression matching correct attribute names attr-rgx=[a-z_][a-z0-9_]{2,30}$ # Naming hint for attribute names attr-name-hint=[a-z_][a-z0-9_]{2,30}$ # Regular expression matching correct argument names argument-rgx=[a-z_][a-z0-9_]{2,30}$ # Naming hint for argument names argument-name-hint=[a-z_][a-z0-9_]{2,30}$ # Regular expression matching correct class attribute names class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ # Naming hint for class attribute names class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ # Regular expression matching correct inline iteration names inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ # Naming hint for inline iteration names inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$ # Regular expression matching correct class names class-rgx=[A-Z_][a-zA-Z0-9]+$ # Naming hint for class names class-name-hint=[A-Z_][a-zA-Z0-9]+$ # Regular expression matching correct module names module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ # Naming hint for module names module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ # Regular expression matching correct method names method-rgx=[a-z_][a-z0-9_]{2,30}$ # Naming hint for method names method-name-hint=[a-z_][a-z0-9_]{2,30}$ # Regular expression which should only match function or class names that do # not require a docstring. no-docstring-rgx=^_ # Minimum line length for functions/classes that require docstrings, shorter # ones are exempt. docstring-min-length=-1 [ELIF] # Maximum number of nested blocks for function / method body max-nested-blocks=5 [FORMAT] # Maximum number of characters on a single line. max-line-length=159 # Regexp for a line that is allowed to be longer than the limit. ignore-long-lines=^\s*(# )??$ # Allow the body of an if to be on the same line as the test if there is no # else. single-line-if-stmt=no # List of optional constructs for which whitespace checking is disabled. `dict- # separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. # `trailing-comma` allows a space between comma and closing bracket: (a, ). # `empty-line` allows space-only lines. no-space-check=trailing-comma,dict-separator # Maximum number of lines in a module max-module-lines=1000 # String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 # tab). indent-string=' ' # Number of spaces of indent required inside a hanging or continued line. indent-after-paren=4 # Expected format of line ending, e.g. empty (any line ending), LF or CRLF. expected-line-ending-format= [LOGGING] # Logging modules to check that the string format arguments are in logging # function parameter format logging-modules=logging [MISCELLANEOUS] # List of note tags to take in consideration, separated by a comma. notes=FIXME,XXX,TODO [SIMILARITIES] # Minimum lines number of a similarity. min-similarity-lines=4 # Ignore comments when computing similarities. ignore-comments=yes # Ignore docstrings when computing similarities. ignore-docstrings=yes # Ignore imports when computing similarities. ignore-imports=no [SPELLING] # Spelling dictionary name. Available dictionaries: none. To make it working # install python-enchant package. spelling-dict= # List of comma separated words that should not be checked. spelling-ignore-words= # A path to a file that contains private dictionary; one word per line. spelling-private-dict-file= # Tells whether to store unknown words to indicated private dictionary in # --spelling-private-dict-file option instead of raising a message. spelling-store-unknown-words=no [TYPECHECK] # Tells whether missing members accessed in mixin class should be ignored. A # mixin class is detected if its name ends with "mixin" (case insensitive). ignore-mixin-members=yes # List of module names for which member attributes should not be checked # (useful for modules/projects where namespaces are manipulated during runtime # and thus existing member attributes cannot be deduced by static analysis. It # supports qualified module names, as well as Unix pattern matching. ignored-modules= # List of class names for which member attributes should not be checked (useful # for classes with dynamically set attributes). This supports the use of # qualified names. ignored-classes=optparse.Values,thread._local,_thread._local # List of members which are set dynamically and missed by pylint inference # system, and so shouldn't trigger E1101 when accessed. Python regular # expressions are accepted. generated-members= # List of decorators that produce context managers, such as # contextlib.contextmanager. Add to this list to register other decorators that # produce valid context managers. contextmanager-decorators=contextlib.contextmanager [VARIABLES] # Tells whether we should check for unused import in __init__ files. init-import=no # A regular expression matching the name of dummy variables (i.e. expectedly # not used). dummy-variables-rgx=(_+[a-zA-Z0-9]*?$)|dummy # List of additional names supposed to be defined in builtins. Remember that # you should avoid to define new builtins when possible. additional-builtins= # List of strings which can identify a callback function by name. A callback # name must start or end with one of those strings. callbacks=cb_,_cb # List of qualified module names which can have objects that can redefine # builtins. redefining-builtins-modules=six.moves,future.builtins [CLASSES] # List of method names used to declare (i.e. assign) instance attributes. defining-attr-methods=__init__,__new__,setUp # List of valid names for the first argument in a class method. valid-classmethod-first-arg=cls # List of valid names for the first argument in a metaclass class method. valid-metaclass-classmethod-first-arg=mcs # List of member names, which should be excluded from the protected access # warning. exclude-protected=_asdict,_fields,_replace,_source,_make [DESIGN] # Maximum number of arguments for function / method max-args=5 # Argument names that match this expression will be ignored. Default to name # with leading underscore ignored-argument-names=_.* # Maximum number of locals for function / method body max-locals=15 # Maximum number of return / yield for function / method body max-returns=6 # Maximum number of branch for function / method body max-branches=12 # Maximum number of statements in function / method body max-statements=60 # Maximum number of parents for a class (see R0901). max-parents=7 # Maximum number of attributes for a class (see R0902). max-attributes=7 # Minimum number of public methods for a class (see R0903). min-public-methods=2 # Maximum number of public methods for a class (see R0904). max-public-methods=20 # Maximum number of boolean expressions in a if statement max-bool-expr=5 [IMPORTS] # Deprecated modules which should not be used, separated by a comma deprecated-modules=regsub,TERMIOS,Bastion,rexec # Create a graph of every (i.e. internal and external) dependencies in the # given file (report RP0402 must not be disabled) import-graph= # Create a graph of external dependencies in the given file (report RP0402 must # not be disabled) ext-import-graph= # Create a graph of internal dependencies in the given file (report RP0402 must # not be disabled) int-import-graph= # Force import order to recognize a module as part of the standard # compatibility libraries. known-standard-library= # Force import order to recognize a module as part of a third party library. known-third-party=enchant # Analyse import fallback blocks. This can be used to support both Python 2 and # 3 compatible code, which means that the block might have code that exists # only in one or another interpreter, leading to false positives when analysed. analyse-fallback-blocks=no [EXCEPTIONS] # Exceptions that will emit a warning when being caught. Defaults to # "Exception" overgeneral-exceptions=Exception dict2css-0.3.0.post1/.readthedocs.yml000066400000000000000000000006371452735053000173750ustar00rootroot00000000000000# This file is managed by 'repo_helper'. Don't edit it directly. # Read the Docs configuration file --- version: 2 sphinx: builder: html configuration: doc-source/conf.py formats: - pdf - htmlzip python: install: - requirements: requirements.txt - requirements: doc-source/requirements.txt build: os: ubuntu-20.04 tools: python: '3.9' jobs: post_create_environment: - pip install . dict2css-0.3.0.post1/.style.yapf000066400000000000000000000272001452735053000164010ustar00rootroot00000000000000[style] # Align closing bracket with visual indentation. align_closing_bracket_with_visual_indent=True # Allow dictionary keys to exist on multiple lines. For example: # # x = { # ('this is the first element of a tuple', # 'this is the second element of a tuple'): # value, # } allow_multiline_dictionary_keys=True # Allow lambdas to be formatted on more than one line. allow_multiline_lambdas=False # Allow splitting before a default / named assignment in an argument list. allow_split_before_default_or_named_assigns=True # Allow splits before the dictionary value. allow_split_before_dict_value=True # Let spacing indicate operator precedence. For example: # # a = 1 * 2 + 3 / 4 # b = 1 / 2 - 3 * 4 # c = (1 + 2) * (3 - 4) # d = (1 - 2) / (3 + 4) # e = 1 * 2 - 3 # f = 1 + 2 + 3 + 4 # # will be formatted as follows to indicate precedence: # # a = 1*2 + 3/4 # b = 1/2 - 3*4 # c = (1+2) * (3-4) # d = (1-2) / (3+4) # e = 1*2 - 3 # f = 1 + 2 + 3 + 4 # arithmetic_precedence_indication=False # Number of blank lines surrounding top-level function and class # definitions. blank_lines_around_top_level_definition=2 # Insert a blank line before a class-level docstring. blank_line_before_class_docstring=False # Insert a blank line before a module docstring. blank_line_before_module_docstring=False # Insert a blank line before a 'def' or 'class' immediately nested # within another 'def' or 'class'. For example: # # class Foo: # # <------ this blank line # def method(): # ... blank_line_before_nested_class_or_def=True # Do not split consecutive brackets. Only relevant when # dedent_closing_brackets is set. For example: # # call_func_that_takes_a_dict( # { # 'key1': 'value1', # 'key2': 'value2', # } # ) # # would reformat to: # # call_func_that_takes_a_dict({ # 'key1': 'value1', # 'key2': 'value2', # }) coalesce_brackets=True # The column limit. column_limit=115 # The style for continuation alignment. Possible values are: # # - SPACE: Use spaces for continuation alignment. This is default behavior. # - FIXED: Use fixed number (CONTINUATION_INDENT_WIDTH) of columns # (ie: CONTINUATION_INDENT_WIDTH/INDENT_WIDTH tabs or # CONTINUATION_INDENT_WIDTH spaces) for continuation alignment. # - VALIGN-RIGHT: Vertically align continuation lines to multiple of # INDENT_WIDTH columns. Slightly right (one tab or a few spaces) if # cannot vertically align continuation lines with indent characters. continuation_align_style=VALIGN-RIGHT # Indent width used for line continuations. continuation_indent_width=8 # Put closing brackets on a separate line, dedented, if the bracketed # expression can't fit in a single line. Applies to all kinds of brackets, # including function definitions and calls. For example: # # config = { # 'key1': 'value1', # 'key2': 'value2', # } # <--- this bracket is dedented and on a separate line # # time_series = self.remote_client.query_entity_counters( # entity='dev3246.region1', # key='dns.query_latency_tcp', # transform=Transformation.AVERAGE(window=timedelta(seconds=60)), # start_ts=now()-timedelta(days=3), # end_ts=now(), # ) # <--- this bracket is dedented and on a separate line dedent_closing_brackets=False # Disable the heuristic which places each list element on a separate line # if the list is comma-terminated. disable_ending_comma_heuristic=False # Place each dictionary entry onto its own line. each_dict_entry_on_separate_line=False # Require multiline dictionary even if it would normally fit on one line. # For example: # # config = { # 'key1': 'value1' # } force_multiline_dict=False # The regex for an i18n comment. The presence of this comment stops # reformatting of that line, because the comments are required to be # next to the string they translate. ;i18n_comment= # The i18n function call names. The presence of this function stops # reformattting on that line, because the string it has cannot be moved # away from the i18n comment. ;i18n_function_call= # Indent blank lines. indent_blank_lines=False # Put closing brackets on a separate line, indented, if the bracketed # expression can't fit in a single line. Applies to all kinds of brackets, # including function definitions and calls. For example: # # config = { # 'key1': 'value1', # 'key2': 'value2', # } # <--- this bracket is indented and on a separate line # # time_series = self.remote_client.query_entity_counters( # entity='dev3246.region1', # key='dns.query_latency_tcp', # transform=Transformation.AVERAGE(window=timedelta(seconds=60)), # start_ts=now()-timedelta(days=3), # end_ts=now(), # ) # <--- this bracket is indented and on a separate line indent_closing_brackets=True # Indent the dictionary value if it cannot fit on the same line as the # dictionary key. For example: # # config = { # 'key1': # 'value1', # 'key2': value1 + # value2, # } indent_dictionary_value=True # The number of columns to use for indentation. indent_width=4 # Join short lines into one line. E.g., single line 'if' statements. join_multiple_lines=False # Do not include spaces around selected binary operators. For example: # # 1 + 2 * 3 - 4 / 5 # # will be formatted as follows when configured with "*,/": # # 1 + 2*3 - 4/5 ;no_spaces_around_selected_binary_operators= # Use spaces around default or named assigns. spaces_around_default_or_named_assign=False # Adds a space after the opening '{' and before the ending '}' dict delimiters. # # {1: 2} # # will be formatted as: # # { 1: 2 } spaces_around_dict_delimiters=False # Adds a space after the opening '[' and before the ending ']' list delimiters. # # [1, 2] # # will be formatted as: # # [ 1, 2 ] spaces_around_list_delimiters=False # Use spaces around the power operator. spaces_around_power_operator=False # Use spaces around the subscript / slice operator. For example: # # my_list[1 : 10 : 2] spaces_around_subscript_colon=False # Adds a space after the opening '(' and before the ending ')' tuple delimiters. # # (1, 2, 3) # # will be formatted as: # # ( 1, 2, 3 ) spaces_around_tuple_delimiters=False # The number of spaces required before a trailing comment. # This can be a single value (representing the number of spaces # before each trailing comment) or list of values (representing # alignment column values; trailing comments within a block will # be aligned to the first column value that is greater than the maximum # line length within the block). For example: # # With spaces_before_comment=5: # # 1 + 1 # Adding values # # will be formatted as: # # 1 + 1 # Adding values <-- 5 spaces between the end of the statement and comment # # With spaces_before_comment=15, 20: # # 1 + 1 # Adding values # two + two # More adding # # longer_statement # This is a longer statement # short # This is a shorter statement # # a_very_long_statement_that_extends_beyond_the_final_column # Comment # short # This is a shorter statement # # will be formatted as: # # 1 + 1 # Adding values <-- end of line comments in block aligned to col 15 # two + two # More adding # # longer_statement # This is a longer statement <-- end of line comments in block aligned to col 20 # short # This is a shorter statement # # a_very_long_statement_that_extends_beyond_the_final_column # Comment <-- the end of line comments are aligned based on the line length # short # This is a shorter statement # spaces_before_comment=2 # Insert a space between the ending comma and closing bracket of a list, # etc. space_between_ending_comma_and_closing_bracket=True # Use spaces inside brackets, braces, and parentheses. For example: # # method_call( 1 ) # my_dict[ 3 ][ 1 ][ get_index( *args, **kwargs ) ] # my_set = { 1, 2, 3 } space_inside_brackets=False # Split before arguments split_all_comma_separated_values=False # Split before arguments, but do not split all subexpressions recursively # (unless needed). split_all_top_level_comma_separated_values=True # Split before arguments if the argument list is terminated by a # comma. split_arguments_when_comma_terminated=False # Set to True to prefer splitting before '+', '-', '*', '/', '//', or '@' # rather than after. split_before_arithmetic_operator=True # Set to True to prefer splitting before '&', '|' or '^' rather than # after. split_before_bitwise_operator=True # Split before the closing bracket if a list or dict literal doesn't fit on # a single line. split_before_closing_bracket=True # Split before a dictionary or set generator (comp_for). For example, note # the split before the 'for': # # foo = { # variable: 'Hello world, have a nice day!' # for variable in bar if variable != 42 # } split_before_dict_set_generator=True # Split before the '.' if we need to split a longer expression: # # foo = ('This is a really long string: {}, {}, {}, {}'.format(a, b, c, d)) # # would reformat to something like: # # foo = ('This is a really long string: {}, {}, {}, {}' # .format(a, b, c, d)) split_before_dot=False # Split after the opening paren which surrounds an expression if it doesn't # fit on a single line. split_before_expression_after_opening_paren=True # If an argument / parameter list is going to be split, then split before # the first argument. split_before_first_argument=False # Set to True to prefer splitting before 'and' or 'or' rather than # after. split_before_logical_operator=True # Split named assignments onto individual lines. split_before_named_assigns=True # Set to True to split list comprehensions and generators that have # non-trivial expressions and multiple clauses before each of these # clauses. For example: # # result = [ # a_long_var + 100 for a_long_var in xrange(1000) # if a_long_var % 10] # # would reformat to something like: # # result = [ # a_long_var + 100 # for a_long_var in xrange(1000) # if a_long_var % 10] split_complex_comprehension=True # The penalty for splitting right after the opening bracket. split_penalty_after_opening_bracket=100 # The penalty for splitting the line after a unary operator. split_penalty_after_unary_operator=10000 # The penalty of splitting the line around the '+', '-', '*', '/', '//', # ``%``, and '@' operators. split_penalty_arithmetic_operator=300 # The penalty for splitting right before an if expression. split_penalty_before_if_expr=0 # The penalty of splitting the line around the '&', '|', and '^' # operators. split_penalty_bitwise_operator=300 # The penalty for splitting a list comprehension or generator # expression. split_penalty_comprehension=80 # The penalty for characters over the column limit. split_penalty_excess_character=7000 # The penalty incurred by adding a line split to the unwrapped line. The # more line splits added the higher the penalty. split_penalty_for_added_line_split=30 # The penalty of splitting a list of "import as" names. For example: # # from a_very_long_or_indented_module_name_yada_yad import (long_argument_1, # long_argument_2, # long_argument_3) # # would reformat to something like: # # from a_very_long_or_indented_module_name_yada_yad import ( # long_argument_1, long_argument_2, long_argument_3) split_penalty_import_names=0 # The penalty of splitting the line around the 'and' and 'or' # operators. split_penalty_logical_operator=300 # Use the Tab character for indentation. use_tabs=True dict2css-0.3.0.post1/CONTRIBUTING.rst000066400000000000000000000025011452735053000167400ustar00rootroot00000000000000============== Contributing ============== .. This file based on https://github.com/PyGithub/PyGithub/blob/master/CONTRIBUTING.md ``dict2css`` uses `tox `_ to automate testing and packaging, and `pre-commit `_ to maintain code quality. Install ``pre-commit`` with ``pip`` and install the git hook: .. code-block:: bash $ python -m pip install pre-commit $ pre-commit install Coding style -------------- `formate `_ is used for code formatting. It can be run manually via ``pre-commit``: .. code-block:: bash $ pre-commit run formate -a Or, to run the complete autoformatting suite: .. code-block:: bash $ pre-commit run -a Automated tests ------------------- Tests are run with ``tox`` and ``pytest``. To run tests for a specific Python version, such as Python 3.6: .. code-block:: bash $ tox -e py36 To run tests for all Python versions, simply run: .. code-block:: bash $ tox Type Annotations ------------------- Type annotations are checked using ``mypy``. Run ``mypy`` using ``tox``: .. code-block:: bash $ tox -e mypy Build documentation locally ------------------------------ The documentation is powered by Sphinx. A local copy of the documentation can be built with ``tox``: .. code-block:: bash $ tox -e docs dict2css-0.3.0.post1/LICENSE000066400000000000000000000020501452735053000153030ustar00rootroot00000000000000Copyright (c) 2021 Dominic Davis-Foster Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. dict2css-0.3.0.post1/README.rst000066400000000000000000000133241452735053000157730ustar00rootroot00000000000000######### dict2css ######### .. start short_desc **A μ-library for constructing cascading style sheets from Python dictionaries.** .. end short_desc .. start shields .. list-table:: :stub-columns: 1 :widths: 10 90 * - Docs - |docs| |docs_check| * - Tests - |actions_linux| |actions_windows| |actions_macos| |coveralls| * - PyPI - |pypi-version| |supported-versions| |supported-implementations| |wheel| * - Anaconda - |conda-version| |conda-platform| * - Activity - |commits-latest| |commits-since| |maintained| |pypi-downloads| * - QA - |codefactor| |actions_flake8| |actions_mypy| * - Other - |license| |language| |requires| .. |docs| image:: https://img.shields.io/readthedocs/dict2css/latest?logo=read-the-docs :target: https://dict2css.readthedocs.io/en/latest :alt: Documentation Build Status .. |docs_check| image:: https://github.com/sphinx-toolbox/dict2css/workflows/Docs%20Check/badge.svg :target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22Docs+Check%22 :alt: Docs Check Status .. |actions_linux| image:: https://github.com/sphinx-toolbox/dict2css/workflows/Linux/badge.svg :target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22Linux%22 :alt: Linux Test Status .. |actions_windows| image:: https://github.com/sphinx-toolbox/dict2css/workflows/Windows/badge.svg :target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22Windows%22 :alt: Windows Test Status .. |actions_macos| image:: https://github.com/sphinx-toolbox/dict2css/workflows/macOS/badge.svg :target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22macOS%22 :alt: macOS Test Status .. |actions_flake8| image:: https://github.com/sphinx-toolbox/dict2css/workflows/Flake8/badge.svg :target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22Flake8%22 :alt: Flake8 Status .. |actions_mypy| image:: https://github.com/sphinx-toolbox/dict2css/workflows/mypy/badge.svg :target: https://github.com/sphinx-toolbox/dict2css/actions?query=workflow%3A%22mypy%22 :alt: mypy status .. |requires| image:: https://dependency-dash.repo-helper.uk/github/sphinx-toolbox/dict2css/badge.svg :target: https://dependency-dash.repo-helper.uk/github/sphinx-toolbox/dict2css/ :alt: Requirements Status .. |coveralls| image:: https://img.shields.io/coveralls/github/sphinx-toolbox/dict2css/master?logo=coveralls :target: https://coveralls.io/github/sphinx-toolbox/dict2css?branch=master :alt: Coverage .. |codefactor| image:: https://img.shields.io/codefactor/grade/github/sphinx-toolbox/dict2css?logo=codefactor :target: https://www.codefactor.io/repository/github/sphinx-toolbox/dict2css :alt: CodeFactor Grade .. |pypi-version| image:: https://img.shields.io/pypi/v/dict2css :target: https://pypi.org/project/dict2css/ :alt: PyPI - Package Version .. |supported-versions| image:: https://img.shields.io/pypi/pyversions/dict2css?logo=python&logoColor=white :target: https://pypi.org/project/dict2css/ :alt: PyPI - Supported Python Versions .. |supported-implementations| image:: https://img.shields.io/pypi/implementation/dict2css :target: https://pypi.org/project/dict2css/ :alt: PyPI - Supported Implementations .. |wheel| image:: https://img.shields.io/pypi/wheel/dict2css :target: https://pypi.org/project/dict2css/ :alt: PyPI - Wheel .. |conda-version| image:: https://img.shields.io/conda/v/domdfcoding/dict2css?logo=anaconda :target: https://anaconda.org/domdfcoding/dict2css :alt: Conda - Package Version .. |conda-platform| image:: https://img.shields.io/conda/pn/domdfcoding/dict2css?label=conda%7Cplatform :target: https://anaconda.org/domdfcoding/dict2css :alt: Conda - Platform .. |license| image:: https://img.shields.io/github/license/sphinx-toolbox/dict2css :target: https://github.com/sphinx-toolbox/dict2css/blob/master/LICENSE :alt: License .. |language| image:: https://img.shields.io/github/languages/top/sphinx-toolbox/dict2css :alt: GitHub top language .. |commits-since| image:: https://img.shields.io/github/commits-since/sphinx-toolbox/dict2css/v0.3.0.post1 :target: https://github.com/sphinx-toolbox/dict2css/pulse :alt: GitHub commits since tagged version .. |commits-latest| image:: https://img.shields.io/github/last-commit/sphinx-toolbox/dict2css :target: https://github.com/sphinx-toolbox/dict2css/commit/master :alt: GitHub last commit .. |maintained| image:: https://img.shields.io/maintenance/yes/2023 :alt: Maintenance .. |pypi-downloads| image:: https://img.shields.io/pypi/dm/dict2css :target: https://pypi.org/project/dict2css/ :alt: PyPI - Downloads .. end shields ``dict2css`` provides an API similar to the json_ and toml_ modules, with ``dump`` and ``load`` functions. The ``dump`` function takes a mapping of `CSS selectors`_ to mappings of CSS properties. Each property value may, optionally, be a two-element tuple containing the value and the string "important". The ``load`` function returns a mapping with the same structure. For more information see `the documentation`_. .. _json: https://docs.python.org/3/library/json.html .. _toml: https://github.com/uiri/toml/ .. _CSS selectors: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors .. _the documentation: https://dict2css.readthedocs.io/en/latest/ Installation -------------- .. start installation ``dict2css`` can be installed from PyPI or Anaconda. To install with ``pip``: .. code-block:: bash $ python -m pip install dict2css To install with ``conda``: * First add the required channels .. code-block:: bash $ conda config --add channels https://conda.anaconda.org/conda-forge $ conda config --add channels https://conda.anaconda.org/domdfcoding * Then install .. code-block:: bash $ conda install dict2css .. end installation dict2css-0.3.0.post1/dict2css/000077500000000000000000000000001452735053000160175ustar00rootroot00000000000000dict2css-0.3.0.post1/dict2css/__init__.py000066400000000000000000000240001452735053000201240ustar00rootroot00000000000000#!/usr/bin/env python3 # # __init__.py """ A μ-library for constructing cascasing style sheets from Python dictionaries. .. latex:vspace:: 10px .. seealso:: `css-parser `_, which this library builds upon. """ # # Copyright © 2020-2021 Dominic Davis-Foster # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE # OR OTHER DEALINGS IN THE SOFTWARE. # # stdlib from io import TextIOBase from typing import IO, Any, Dict, Mapping, MutableMapping, Sequence, Union, cast # 3rd party from domdf_python_tools.paths import PathPlus from domdf_python_tools.typing import PathLike from domdf_python_tools.words import TAB try: # 3rd party import css_parser # type: ignore except ImportError: # pragma: no cover import cssutils as css_parser # type: ignore # this package from dict2css.helpers import em, px, rem from dict2css.serializer import CSSSerializer __author__: str = "Dominic Davis-Foster" __copyright__: str = "2020-2021 Dominic Davis-Foster" __license__: str = "MIT License" __version__: str = "0.3.0.post1" __email__: str = "dominic@davis-foster.co.uk" __all__ = [ "IMPORTANT", "Style", "dumps", "dump", "loads", "load", "StyleSheet", "make_style", ] IMPORTANT = "important" """ The string ``'important'``. .. latex:vspace:: 10px """ # Property = Union[Tuple[Union[str, int, None], str], str, int, None] Property = Union[Sequence, str, int, None] Style = Mapping[str, Property] """ Type annotation representing a style for :func:`~.make_style` and :func:`~.dumps`. The keys are CSS properties. The values can be either: * A :class:`str`, :class:`float` or :py:obj:`None`, giving the value of the property. * A :class:`tuple` of the property's value (as above) and the priority such as :data:`~.IMPORTANT` (which sets ``!important`` on the property). """ def dumps( styles: Mapping[str, Union[Style, Mapping]], *, indent: str = TAB, trailing_semicolon: bool = False, indent_closing_brace: bool = False, minify: bool = False, ) -> str: r""" Construct a cascading style sheet from a dictionary. ``styles`` is a mapping of CSS selector strings to styles, which map property names to their values: .. code-block:: python styles = {".wy-nav-content": {"max-width": (px(1200), IMPORTANT)}} print(dumps(styles)) .. code-block:: css .wy-nav-content { max-width: 1200px !important } See the :py:obj:`~.Style` object for more information on the layout. The keys can also be media at-rules, with the values mappings of property names to their values: .. code-block:: python styles = { "@media screen and (min-width: 870px)": { ".wy-nav-content": {"max-width": (px(1200), IMPORTANT)}, }, } print(dumps(styles)) .. code-block:: css @media screen and (min-width: 870px) { .wy-nav-content { max-width: 1200px !important } } :param styles: A mapping of CSS selectors to styles. :param indent: The indent to use, such as a tab (``\t``), two spaces or four spaces. :param trailing_semicolon: Whether to add a semicolon to the end of the final property. :param indent_closing_brace: :param minify: Minify the CSS. Overrides all other options. :return: The style sheet as a string. .. versionchanged:: 0.2.0 Added support for media at-rules. """ serializer = CSSSerializer( indent=indent, trailing_semicolon=trailing_semicolon, indent_closing_brace=indent_closing_brace, minify=minify, ) stylesheet: str = '' with serializer.use(): sheet = StyleSheet() for selector, style in styles.items(): if selector.startswith("@media"): sheet.add_media_styles(selector.split("@media")[1].strip(), cast(Mapping[str, Style], style)) elif selector.startswith('@'): raise NotImplementedError("Only @media at-rules are supported at this time.") else: sheet.add_style(selector, cast(Style, style)) stylesheet = sheet.tostring() if not serializer.minify: stylesheet = stylesheet.replace('}', "}\n") return stylesheet def dump( styles: Mapping[str, Union[Style, Mapping]], fp: Union[PathLike, IO], *, indent: str = TAB, trailing_semicolon: bool = False, indent_closing_brace: bool = False, minify: bool = False, ) -> None: r""" Construct a style sheet from a dictionary and write it to ``fp``. .. code-block:: python styles = {".wy-nav-content": {"max-width": (px(1200), IMPORTANT)}} dump(styles, ...) .. code-block:: css .wy-nav-content { max-width: 1200px !important } See the :py:obj:`~.Style` object for more information on the layout. .. latex:clearpage:: The keys can also be media at-rules, with the values mappings of property names to their values: .. code-block:: python styles = { "@media screen and (min-width: 870px)": { ".wy-nav-content": {"max-width": (px(1200), IMPORTANT)}, }, } dump(styles, ...) .. code-block:: css @media screen and (min-width: 870px) { .wy-nav-content { max-width: 1200px !important } } :param styles: A mapping of CSS selectors to styles. :param fp: An open file handle, or the filename of a file to write to. :param indent: The indent to use, such as a tab (``\t``), two spaces or four spaces. :param trailing_semicolon: Whether to add a semicolon to the end of the final property. :param indent_closing_brace: :param minify: Minify the CSS. Overrides all other options. .. versionchanged:: 0.2.0 * ``fp`` now accepts :py:obj:`domdf_python_tools.typing.PathLike` objects, representing the path of a file to write to. * Added support for media at-rules. """ css = dumps( styles, indent=indent, trailing_semicolon=trailing_semicolon, indent_closing_brace=indent_closing_brace, minify=minify, ) if isinstance(fp, TextIOBase): fp.write(css) else: PathPlus(fp).write_clean(css) def loads(styles: str) -> MutableMapping[str, MutableMapping[str, Any]]: r""" Parse a style sheet and return its dictionary representation. .. versionadded:: 0.2.0 :param styles: :return: The style sheet as a dictionary. """ parser = css_parser.CSSParser(validate=False) stylesheet: css_parser.css.CSSStyleSheet = parser.parseString(styles) styles_dict: MutableMapping[str, MutableMapping[str, Any]] = {} def parse_style(style: css_parser.css.CSSStyleDeclaration) -> MutableMapping[str, Property]: style_dict: Dict[str, Property] = {} prop: css_parser.css.Property for prop in style.children(): if prop.priority: style_dict[prop.name] = (prop.value, prop.priority) else: style_dict[prop.name] = prop.value return style_dict rule: css_parser.css.CSSRule for rule in stylesheet.cssRules: if isinstance(rule, css_parser.css.CSSStyleRule): styles_dict[rule.selectorText] = parse_style(rule.style) elif isinstance(rule, css_parser.css.CSSMediaRule): styles_dict[f"@media {rule.media.mediaText}"] = {} for child in rule.cssRules: styles_dict[f"@media {rule.media.mediaText}"][child.selectorText] = parse_style(child.style) else: raise NotImplementedError(rule) return styles_dict def load(fp: Union[PathLike, IO]) -> MutableMapping[str, MutableMapping[str, Any]]: r""" Parse a cascading style sheet from the given file and return its dictionary representation. .. versionadded:: 0.2.0 :param fp: An open file handle, or the filename of a file to write to. :return: The style sheet as a dictionary. """ if isinstance(fp, TextIOBase): styles = fp.read() else: styles = PathPlus(fp).read_text() return loads(styles) class StyleSheet(css_parser.css.CSSStyleSheet): r""" Represents a CSS style sheet. .. raw:: latex \nopagebreak .. autosummary-widths:: 7/16 """ def __init__(self): super().__init__(validating=False) def add(self, rule: css_parser.css.CSSRule) -> int: """ Add the ``rule`` to the style sheet. :param rule: :type rule: :class:`css_parser.css.CSSRule` """ return super().add(rule) def add_style( self, selector: str, styles: Style, ) -> None: """ Add a style to the style sheet. :param selector: :param styles: """ self.add(make_style(selector, styles)) def add_media_styles( self, media_query: str, styles: Mapping[str, Style], ) -> None: """ Add a set of styles for a media query to the style sheet. .. versionadded:: 0.2.0 :param media_query: :param styles: """ media = css_parser.css.CSSMediaRule(media_query) for selector, style in styles.items(): media.add(make_style(selector, style)) self.add(media) def tostring(self) -> str: """ Returns the style sheet as a string. """ return self.cssText.decode("UTF-8") def make_style(selector: str, styles: Style) -> css_parser.css.CSSStyleRule: """ Create a CSS Style Rule from a dictionary. :param selector: :param styles: :rtype: :class:`css_parser.css.CSSStyleRule` """ style = css_parser.css.CSSStyleDeclaration() style.validating = False for name, properties in styles.items(): if isinstance(properties, Sequence) and not isinstance(properties, str): style[name] = tuple(str(x) for x in properties) else: style[name] = str(properties) return css_parser.css.CSSStyleRule(selectorText=selector, style=style) dict2css-0.3.0.post1/dict2css/helpers.py000066400000000000000000000033231452735053000200340ustar00rootroot00000000000000#!/usr/bin/env python3 # # helpers.py """ Helper functions. .. versionadded:: 0.2.0 """ # # Copyright © 2020-2021 Dominic Davis-Foster # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE # OR OTHER DEALINGS IN THE SOFTWARE. # # stdlib from typing import Union __all__ = ["em", "px", "rem"] def px(val: Union[int, float, str]) -> str: """ Helper function to format a number as a value in pixels. :param val: """ return f"{val}px" def em(val: Union[int, float, str]) -> str: """ Helper function to format a number as a value in em. :param val: """ return f"{val}em" def rem(val: Union[int, float, str]) -> str: """ Helper function to format a number as a value in rem. :param val: """ return f"{val}rem" dict2css-0.3.0.post1/dict2css/py.typed000066400000000000000000000000001452735053000175040ustar00rootroot00000000000000dict2css-0.3.0.post1/dict2css/serializer.py000066400000000000000000000060401452735053000205420ustar00rootroot00000000000000#!/usr/bin/env python3 # # serializer.py """ Serializer for cascading style sheets. .. versionadded:: 0.2.0 """ # # Copyright © 2021 Dominic Davis-Foster # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell # copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, # EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, # DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE # OR OTHER DEALINGS IN THE SOFTWARE. # # stdlib from contextlib import contextmanager from typing import Iterator # 3rd party from domdf_python_tools.words import TAB try: # 3rd party import css_parser # type: ignore except ImportError: # pragma: no cover # 3rd party import cssutils as css_parser # type: ignore __all__ = ["CSSSerializer"] class CSSSerializer(css_parser.CSSSerializer): r""" Serializes a :class:`~.StyleSheet` and its parts. This controls the formatting of the style sheet. :param indent: The indent to use, such as a tab (``\t``), two spaces or four spaces. :param trailing_semicolon: Whether to add a semicolon to the end of the final property. :param indent_closing_brace: :param minify: Minify the CSS. Overrides all other options. .. autosummary-widths:: 5/16 """ def __init__( self, *, indent: str = TAB, trailing_semicolon: bool = False, indent_closing_brace: bool = False, minify: bool = False, ): super().__init__() self.indent = str(indent) self.trailing_semicolon = trailing_semicolon self.indent_closing_brace = indent_closing_brace self.minify = minify def reset_style(self) -> None: """ Reset the serializer to its default style. """ # Reset CSS Parser to defaults self.prefs.useDefaults() if self.minify: self.prefs.useMinified() else: # Formatting preferences self.prefs.omitLastSemicolon = not self.trailing_semicolon self.prefs.indentClosingBrace = self.indent_closing_brace self.prefs.indent = self.indent @contextmanager def use(self) -> Iterator: """ Contextmanager to use this serializer for the scope of the ``with`` block. """ # if css_parser.ser is self: # yield # return # current_serializer = css_parser.ser self.reset_style() try: css_parser.ser = self yield finally: css_parser.ser = current_serializer dict2css-0.3.0.post1/doc-source/000077500000000000000000000000001452735053000163445ustar00rootroot00000000000000dict2css-0.3.0.post1/doc-source/404.rst000066400000000000000000000003271452735053000174070ustar00rootroot00000000000000:orphan: =============== 404 =============== We looked everywhere but we couldn't find that page! .. image:: not-found.png :align: center Try using the links in the sidebar to find what you are looking for. dict2css-0.3.0.post1/doc-source/Source.rst000066400000000000000000000025511452735053000203410ustar00rootroot00000000000000========================= Downloading source code ========================= The ``dict2css`` source code is available on GitHub, and can be accessed from the following URL: https://github.com/sphinx-toolbox/dict2css If you have ``git`` installed, you can clone the repository with the following command: .. prompt:: bash git clone https://github.com/sphinx-toolbox/dict2css .. parsed-literal:: Cloning into 'dict2css'... remote: Enumerating objects: 47, done. remote: Counting objects: 100% (47/47), done. remote: Compressing objects: 100% (41/41), done. remote: Total 173 (delta 16), reused 17 (delta 6), pack-reused 126 Receiving objects: 100% (173/173), 126.56 KiB | 678.00 KiB/s, done. Resolving deltas: 100% (66/66), done. | Alternatively, the code can be downloaded in a 'zip' file by clicking: | :guilabel:`Clone or download` --> :guilabel:`Download Zip` .. figure:: git_download.png :alt: Downloading a 'zip' file of the source code. Downloading a 'zip' file of the source code Building from source ----------------------- The recommended way to build ``dict2css`` is to use `tox `_: .. prompt:: bash tox -e build The source and wheel distributions will be in the directory ``dist``. If you wish, you may also use `pep517.build `_ or another :pep:`517`-compatible build tool. dict2css-0.3.0.post1/doc-source/_static/000077500000000000000000000000001452735053000177725ustar00rootroot00000000000000dict2css-0.3.0.post1/doc-source/_static/style.css000066400000000000000000000004061452735053000216440ustar00rootroot00000000000000/* This file is managed by 'repo_helper'. Don't edit it directly. */ div.highlight { -moz-tab-size: 4; tab-size: 4; } .field-list dt, dl.simple dt { margin-top: 0.5rem; } div.versionchanged ul, div.versionremoved ul { margin-left: 20px; margin-top: 0; } dict2css-0.3.0.post1/doc-source/_templates/000077500000000000000000000000001452735053000205015ustar00rootroot00000000000000dict2css-0.3.0.post1/doc-source/_templates/base.html000066400000000000000000000005411452735053000223010ustar00rootroot00000000000000 {% extends "!base.html" %} {% block extrahead %} {% endblock %} dict2css-0.3.0.post1/doc-source/api/000077500000000000000000000000001452735053000171155ustar00rootroot00000000000000dict2css-0.3.0.post1/doc-source/api/dict2css.rst000066400000000000000000000005301452735053000213630ustar00rootroot00000000000000================ :mod:`dict2css` ================ .. autosummary-widths:: 21/64 :html: 41/128 .. raw:: latex \let\oldsphinxcode\sphinxcode \renewcommand{\sphinxcode}[1]{\mbox{\oldsphinxcode{#1}}} .. automodule:: dict2css :no-show-inheritance: :member-order: bysource .. raw:: latex \renewcommand{\sphinxcode}[1]{\oldsphinxcode{#1}} dict2css-0.3.0.post1/doc-source/api/helpers.rst000066400000000000000000000002351452735053000213110ustar00rootroot00000000000000=========================== :mod:`dict2css.helpers` =========================== .. autosummary-widths:: 7/16 :html: 2/10 .. automodule:: dict2css.helpers dict2css-0.3.0.post1/doc-source/api/serializer.rst000066400000000000000000000002711452735053000220200ustar00rootroot00000000000000=========================== :mod:`dict2css.serializer` =========================== .. autosummary-widths:: 1/2 :html: 4/10 .. automodule:: dict2css.serializer :no-show-inheritance: dict2css-0.3.0.post1/doc-source/changelog.rst000066400000000000000000000006121452735053000210240ustar00rootroot00000000000000=============== Changelog =============== 0.2.2 ------- Changed the build backend from setuptools_ to whey_. .. _setuptools: https://setuptools.readthedocs.io/en/latest/ .. _whey: https://whey.readthedocs.io/en/latest/ 0.2.1 --------- Import ``Iterator`` from :mod:`typing` rather than from :mod:`collections`. 0.2.0 --------- .. changelog:: 0.2.0 0.1.0 --------- Initial release. dict2css-0.3.0.post1/doc-source/conf.py000066400000000000000000000045001452735053000176420ustar00rootroot00000000000000#!/usr/bin/env python3 # This file is managed by 'repo_helper'. Don't edit it directly. # stdlib import os import re import sys # 3rd party from sphinx_pyproject import SphinxConfig sys.path.append('.') config = SphinxConfig(globalns=globals()) project = config["project"] author = config["author"] documentation_summary = config.description github_url = "https://github.com/{github_username}/{github_repository}".format_map(config) rst_prolog = f""".. |pkgname| replace:: dict2css .. |pkgname2| replace:: ``dict2css`` .. |browse_github| replace:: `Browse the GitHub Repository <{github_url}>`__ """ slug = re.sub(r'\W+', '-', project.lower()) release = version = config.version 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), "sphinx": ("https://www.sphinx-doc.org/en/stable/", None), } html_theme_options = { "light_css_variables": { "toc-title-font-size": "12pt", "toc-font-size": "12pt", "admonition-font-size": "12pt", }, "dark_css_variables": { "toc-title-font-size": "12pt", "toc-font-size": "12pt", "admonition-font-size": "12pt", }, } html_context = {} htmlhelp_basename = slug latex_documents = [("index", f'{slug}.tex', project, author, "manual")] man_pages = [("index", slug, project, [author], 1)] texinfo_documents = [("index", slug, project, author, slug, project, "Miscellaneous")] toctree_plus_types = set(config["toctree_plus_types"]) autodoc_default_options = { "members": None, # Include all members (methods). "special-members": None, "autosummary": None, "show-inheritance": None, "exclude-members": ','.join(config["autodoc_exclude_members"]), } latex_elements = { "printindex": "\\begin{flushleft}\n\\printindex\n\\end{flushleft}", "tableofcontents": "\\pdfbookmark[0]{\\contentsname}{toc}\\sphinxtableofcontents", } def setup(app): # 3rd party from sphinx_toolbox.latex import better_header_layout app.connect("config-inited", lambda app, config: better_header_layout(config)) nitpicky = True latex_elements["preamble"] = "\\raggedbottom\n\\widowpenalty10000" ignore_missing_xrefs = ["^css_parser\\."] autosummary_widths_builders = ["latex"] changelog_sections_numbered = False dict2css-0.3.0.post1/doc-source/docs_needspace.py000066400000000000000000000024671452735053000216660ustar00rootroot00000000000000# 3rd party from domdf_python_tools.stringlist import StringList from sphinx import addnodes from sphinx.application import Sphinx # nodep from sphinx.config import Config # nodep from sphinx.writers.latex import LaTeXTranslator from sphinxcontrib import toctree_plus def visit_desc(translator: LaTeXTranslator, node: addnodes.desc) -> None: """ Visit an :class:`addnodes.desc` node and add a custom table of contents label for the item, if required. .. versionadded:: 0.3.0 :param translator: :param node: """ translator.body.append(r"\needspace{5\baselineskip}") toctree_plus.visit_desc(translator, node) def configure(app: Sphinx, config: Config): """ Configure Sphinx Extension. :param app: The Sphinx application. :param config: """ latex_elements = getattr(config, "latex_elements", {}) latex_extrapackages = StringList(latex_elements.get("extrapackages", '')) latex_extrapackages.append(r"\usepackage{needspace}") latex_elements["extrapackages"] = str(latex_extrapackages) config.latex_elements = latex_elements # type: ignore def setup(app: Sphinx): """ Setup Sphinx Extension. :param app: The Sphinx application. """ app.connect("config-inited", configure) app.add_node(addnodes.desc, latex=(visit_desc, toctree_plus.depart_desc), override=True) return {"parallel_read_safe": True} dict2css-0.3.0.post1/doc-source/docutils.conf000066400000000000000000000000501452735053000210340ustar00rootroot00000000000000[restructuredtext parser] tab_width = 4 dict2css-0.3.0.post1/doc-source/git_download.png000066400000000000000000000642761452735053000215430ustar00rootroot00000000000000PNG  IHDRnvgAMA a cHRMz&u0`:pQ<bKGDgIDATx]T^~v%kR~"EC[)j#TxXxVJRZ`- ɀ_L2OU__4u񏘪6=am+ vlc#Vrv2& ܭ>O.ݿkC֜")6 YZ ۭ9ʌ\e[}`kNB 愥??G69rW!kOyb¦Xst##еC y]~;Q/$ ׽Z?$oE9~_}8o' xWv鍳z"' ۾\*]EOn3%H溷=AK(OOҼ{N_/ݨ8u~ ަ2"f)Y󭫕4zYUc4k ,EQ|cX+,4O.VV/. x벟*n ;Kt=s')tSZ{e񯇮kCfvtOx򛯿[nnu/"+qޟN|+D~b?u{M٘1 \BBG.̴xbղ]o~_eeE)zkxޥd?ziQ|.TSEQvn]lifguV/bM(dtwǺ'*"&gz$orRRu+'ԍ\7~xMm?:%[2 OO@NyEV=_Qp0KOkw.]yg@zoн :?igEWB7 g 㱴l x1u*=~{´7ُVOeXi{tڄQZbD}:D]䌁9iҟ4D+#6e{ M%E9oSyM-KZ?o g wsC髶V 濖ytx39Tzyk}AșD#g253Zkm/N˛gn660K"}cǪj#li}at۾*GN*p@Wj>vƥL :͉7w[}z}_U` i"nݥ>!7m2|Oj(J~k<"B0X>mԣ]/춡ܥ^*ݕw~rf7S/9t=wǫwg R}wrFzT3yWכ*&Ш׷v.Ҷ~Ӯ*+;i1_f i1a\%:ު5` NN9?O@19lNmu^bꅿN~Yݵ8b2(Ae1J1}啭~D4i]SyT/g6/x=YvT6ҿ[ëL<%\CSw=NSM$4\R{Obl74LQ悌'.L4|IwӍj7KM蠝0]{>{M_TuyƠf#r8܅43FYvKBwZċ>s`՜wkstvɐd gSBotXUdGma|LaazD!4imnScVWy'ʻI2]*]lOiת3%쀗e8s7ZEG 䵼<7< Yt?2[/8(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}+>-gLσؙu.ٛuCgzBY$zz]w-qvSA]n%_4ɮTɮTɮ4k|Cs8U+T#K|R"huobffff׏$Rصd9-J7{ەџfffffz`W?+wv,adV}^Gwp{i0#5z䃆/reiꇟ_wtܬIii:DDaiR%Rx '$vz?OH?oB}LDvݷ{wJ]z}累$R?*o#hX'Jb+p?~ `o[6kklPL>Vپ;1g(߾}/Gl0p[+p#M;voUޝpvhVVKrͷZvJHԏC閝ޙ=-i/CVBah\ϡF@_@ lc8dϨ拷o߳cἏҷŕ9[oe時l߽l߱{[>*>T6gwo4.Z^d|U?͍v69vc?uUୟ+|Yt~^M񉪫j/?vqƿ2Nܝeu>쳌=-Y>:qt7V;T5לh8k X67ʖmsNn˗mvSc3qV8SOLп- `1}쿷fUÝ>mmY2ǵM?-g+=?0׿ݠ67,=F/ߟ[5Suk>ys癙>x!c8[f,7&>(`yjf10=x unuMx~C߅Ѡ?9P?Zd?峁,j??_:/| %tEXtdate:create2020-05-24T20:00:42+00:00v%tEXtdate:modify2020-05-24T20:00:42+00:00TtEXtSoftwareShutterc IENDB`dict2css-0.3.0.post1/doc-source/index.rst000066400000000000000000000100531452735053000202040ustar00rootroot00000000000000######### dict2css ######### .. start short_desc .. documentation-summary:: :meta: .. end short_desc .. start shields .. only:: html .. list-table:: :stub-columns: 1 :widths: 10 90 * - Docs - |docs| |docs_check| * - Tests - |actions_linux| |actions_windows| |actions_macos| |coveralls| * - PyPI - |pypi-version| |supported-versions| |supported-implementations| |wheel| * - Anaconda - |conda-version| |conda-platform| * - Activity - |commits-latest| |commits-since| |maintained| |pypi-downloads| * - QA - |codefactor| |actions_flake8| |actions_mypy| * - Other - |license| |language| |requires| .. |docs| rtfd-shield:: :project: dict2css :alt: Documentation Build Status .. |docs_check| actions-shield:: :workflow: Docs Check :alt: Docs Check Status .. |actions_linux| actions-shield:: :workflow: Linux :alt: Linux Test Status .. |actions_windows| actions-shield:: :workflow: Windows :alt: Windows Test Status .. |actions_macos| actions-shield:: :workflow: macOS :alt: macOS Test Status .. |actions_flake8| actions-shield:: :workflow: Flake8 :alt: Flake8 Status .. |actions_mypy| actions-shield:: :workflow: mypy :alt: mypy status .. |requires| image:: https://dependency-dash.repo-helper.uk/github/sphinx-toolbox/dict2css/badge.svg :target: https://dependency-dash.repo-helper.uk/github/sphinx-toolbox/dict2css/ :alt: Requirements Status .. |coveralls| coveralls-shield:: :alt: Coverage .. |codefactor| codefactor-shield:: :alt: CodeFactor Grade .. |pypi-version| pypi-shield:: :project: dict2css :version: :alt: PyPI - Package Version .. |supported-versions| pypi-shield:: :project: dict2css :py-versions: :alt: PyPI - Supported Python Versions .. |supported-implementations| pypi-shield:: :project: dict2css :implementations: :alt: PyPI - Supported Implementations .. |wheel| pypi-shield:: :project: dict2css :wheel: :alt: PyPI - Wheel .. |conda-version| image:: https://img.shields.io/conda/v/domdfcoding/dict2css?logo=anaconda :target: https://anaconda.org/domdfcoding/dict2css :alt: Conda - Package Version .. |conda-platform| image:: https://img.shields.io/conda/pn/domdfcoding/dict2css?label=conda%7Cplatform :target: https://anaconda.org/domdfcoding/dict2css :alt: Conda - Platform .. |license| github-shield:: :license: :alt: License .. |language| github-shield:: :top-language: :alt: GitHub top language .. |commits-since| github-shield:: :commits-since: v0.3.0.post1 :alt: GitHub commits since tagged version .. |commits-latest| github-shield:: :last-commit: :alt: GitHub last commit .. |maintained| maintained-shield:: 2023 :alt: Maintenance .. |pypi-downloads| pypi-shield:: :project: dict2css :downloads: month :alt: PyPI - Downloads .. end shields ``dict2css`` provides an API similar to the :mod:`json` and toml_ modules, with :func:`~.dump` and :func:`~.load` functions. The :func:`~.dump` function takes a mapping of `CSS selectors`_ to mappings of CSS properties. Each property value may, optionally, be a two-element tuple containing the value and the string "important". The :func:`~.load` function returns a mapping with the same structure. .. _json: https://docs.python.org/3/library/json.html .. _toml: https://github.com/uiri/toml/ .. _CSS selectors: https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors Installation --------------- .. start installation .. installation:: dict2css :pypi: :github: :anaconda: :conda-channels: conda-forge, domdfcoding .. end installation Contents ----------- .. html-section:: .. toctree:: :hidden: Home .. toctree:: :maxdepth: 3 :glob: api/dict2css api/* changelog .. sidebar-links:: :caption: Links :github: :pypi: dict2css Contributing Guide Source license .. start links .. only:: html View the :ref:`Function Index ` or browse the `Source Code <_modules/index.html>`__. :github:repo:`Browse the GitHub Repository ` .. end links dict2css-0.3.0.post1/doc-source/latex_mu.py000066400000000000000000000002751452735053000205400ustar00rootroot00000000000000# 3rd party from sphinx.application import Sphinx from sphinx_toolbox.latex import replace_unknown_unicode def setup(app: Sphinx): app.connect("build-finished", replace_unknown_unicode) dict2css-0.3.0.post1/doc-source/license.rst000066400000000000000000000002121452735053000205130ustar00rootroot00000000000000========= License ========= ``dict2css`` is licensed under the :choosealicense:`MIT` .. license-info:: MIT .. license:: :py: dict2css dict2css-0.3.0.post1/doc-source/not-found.png000066400000000000000000001352371452735053000207760ustar00rootroot00000000000000PNG  IHDR\rf'zTXtRaw profile type exifxڭi7sp`?C)J͈M*3wÃ__S4Kk{q3_Ow>?h]?3}$ׅ}>9"~|? K~\ꌟo)_S{~7rcvU)ƓBYA.u|KH ?nO7ui~^oQ?A(??|pv;_vȕ_=exd{[Ww2?"8/?B\rab9",{\D(Wv2"q.}-}n;X-_ޥ- ޾\O^E@[y?6ٸ?r+8'^W[g5c }44XyL9N"JEƜREJ=-kԷ&QRM4V΅iȡQRɥZZ1Wz5\KUhVZmYmXlŪ536z ,֭>Ft\kwfiYfms,gUV]mk&vm{Hq)v3.vͷz۵׿ZZ|]ڷKIQ̈X́7EsT3ߣ,Ȣظ1BO#r7W9D'Q"BOT??6\!Ru\[ 5pmv[]`c-[s%YeS@E"t_n1˗YX:@[ -a39rA ;Ni|Ș8)v n;+ẳZXeOn mݕܜNf< +Zxeo m7͋ mQZllbvPՕMrpɝvG;7xa<˧0oUAkSl7wbiu?qu8 I];^$N7-4uǽ~lM'"g;jxcz\Rq7sʙmkMccCڷⵉerW$My5l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#HG:ґt#HG:ґt#HG:ґt#i-?_=0.6.0 extras-require>=0.5.0 furo>=2020.11.19b18 html-section>=0.3.0 seed-intersphinx-mapping>=1.2.2 sphinx>=3.0.3 sphinx-copybutton>=0.2.12 sphinx-debuginfo>=0.2.2 sphinx-licenseinfo>=0.3.1 sphinx-notfound-page>=0.7.1 sphinx-prompt>=1.1.0 sphinx-pyproject>=0.1.0 sphinx-tabs>=1.1.13 sphinx-toolbox>=3.5.0 sphinxcontrib-httpdomain>=1.7.0 sphinxemoji>=0.1.6 toctree-plus>=0.6.1 dict2css-0.3.0.post1/formate.toml000066400000000000000000000017201452735053000166330ustar00rootroot00000000000000[hooks] dynamic_quotes = 10 collections-import-rewrite = 20 reformat-generics = 40 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.kwargs] indent = "\t\t" multi_line_output = 8 import_heading_stdlib = "stdlib" import_heading_thirdparty = "3rd party" import_heading_firstparty = "this package" import_heading_localfolder = "this package" balanced_wrapping = false lines_between_types = 0 use_parentheses = true remove_redundant_aliases = true default_section = "THIRDPARTY" known_third_party = [ "coincidence", "coverage", "coverage_pyver_pragma", "css_parser", "cssutils", "domdf_python_tools", "github", "importlib_metadata", "pytest", "pytest_cov", "pytest_randomly", "pytest_timeout", "requests", ] known_first_party = "dict2css" line_length = 115 dict2css-0.3.0.post1/justfile000066400000000000000000000005731452735053000160560ustar00rootroot00000000000000default: 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 dict2css-0.3.0.post1/pyproject.toml000066400000000000000000000076161452735053000172270ustar00rootroot00000000000000[build-system] requires = [ "whey",] build-backend = "whey" [project] name = "dict2css" version = "0.3.0.post1" description = "A μ-library for constructing cascading style sheets from Python dictionaries." readme = "README.rst" keywords = [ "css", "serialize",] dynamic = [ "requires-python", "classifiers", "dependencies",] [[project.authors]] name = "Dominic Davis-Foster" email = "dominic@davis-foster.co.uk" [project.license] file = "LICENSE" [project.urls] Homepage = "https://github.com/sphinx-toolbox/dict2css" "Issue Tracker" = "https://github.com/sphinx-toolbox/dict2css/issues" "Source Code" = "https://github.com/sphinx-toolbox/dict2css" Documentation = "https://dict2css.readthedocs.io/en/latest" [tool.whey] base-classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed", ] python-versions = [ "3.6", "3.7", "3.8", "3.9", "3.10", "3.11", "3.12",] python-implementations = [ "CPython", "PyPy",] platforms = [ "Windows", "macOS", "Linux",] license-key = "MIT" [tool.mkrecipe] conda-channels = [ "conda-forge", "domdfcoding",] extras = "all" [tool.sphinx-pyproject] github_username = "sphinx-toolbox" github_repository = "dict2css" author = "Dominic Davis-Foster" project = "dict2css" copyright = "2020-2021 Dominic Davis-Foster" language = "en" package_root = "dict2css" extensions = [ "sphinx_toolbox", "sphinx_toolbox.more_autodoc", "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", "sphinx_debuginfo", "sphinx_licenseinfo", "seed_intersphinx_mapping", "html_section", "sphinx_toolbox_experimental.autosummary_widths", "sphinx_toolbox_experimental.succinct_seealso", "sphinx_toolbox_experimental.needspace", "sphinx_toolbox_experimental.missing_xref", "sphinx_toolbox_experimental.changelog", "latex_mu", ] sphinxemoji_style = "twemoji" gitstamp_fmt = "%d %b %Y" templates_path = [ "_templates",] html_static_path = [ "_static",] source_suffix = ".rst" master_doc = "index" suppress_warnings = [ "image.nonlocal_uri",] pygments_style = "default" html_theme = "furo" html_theme_path = [ "../..",] html_show_sourcelink = true toctree_plus_types = [ "class", "confval", "data", "directive", "enum", "exception", "flag", "function", "namedtuple", "protocol", "role", "typeddict", ] add_module_names = false hide_none_rtype = true all_typevars = true overloads_location = "bottom" html_codeblock_linenos_style = "table" autodoc_exclude_members = [ "__dict__", "__class__", "__dir__", "__weakref__", "__module__", "__annotations__", "__orig_bases__", "__parameters__", "__subclasshook__", "__init_subclass__", "__attrs_attrs__", "__init__", "__new__", "__getnewargs__", "__abstractmethods__", "__hash__", ] [tool.mypy] python_version = "3.8" namespace_packages = true check_untyped_defs = true warn_unused_ignores = true no_implicit_optional = true show_error_codes = true [tool.snippet-fmt] directives = [ "code-block",] [tool.dep_checker] allowed_unused = [ "cssutils",] [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.python] reformat = true [tool.snippet-fmt.languages.TOML] reformat = true [tool.snippet-fmt.languages.ini] [tool.snippet-fmt.languages.json] dict2css-0.3.0.post1/repo_helper.yml000066400000000000000000000026511452735053000173340ustar00rootroot00000000000000# Configuration for 'repo_helper' (https://github.com/domdfcoding/repo_helper) --- modname: 'dict2css' copyright_years: 2020-2021 author: 'Dominic Davis-Foster' email: 'dominic@davis-foster.co.uk' username: 'sphinx-toolbox' assignee: 'domdfcoding' primary_conda_channel: 'domdfcoding' version: '0.3.0.post1' license: 'MIT' short_desc: 'A μ-library for constructing cascading style sheets from Python dictionaries.' use_whey: true sphinx_html_theme: furo min_coverage: 100 docs_fail_on_warning: true preserve_custom_theme: true conda_channels: - conda-forge python_versions: - 3.6 - 3.7 - 3.8 - 3.9 - "3.10" - "3.11" - "3.12" - 3.13-dev - pypy36 - pypy37 - pypy38 - pypy39 keywords: - serialize - css classifiers: - 'Development Status :: 4 - Beta' - 'Intended Audience :: Developers' - 'Topic :: Software Development :: Libraries :: Python Modules' sphinx_conf_epilogue: - nitpicky = True - latex_elements["preamble"] = "\\raggedbottom\n\\widowpenalty10000" - ignore_missing_xrefs = ["^css_parser\\."] - autosummary_widths_builders = ["latex"] - changelog_sections_numbered = False exclude_files: - contributing extra_sphinx_extensions: - sphinx_toolbox_experimental.autosummary_widths - sphinx_toolbox_experimental.succinct_seealso - sphinx_toolbox_experimental.needspace - sphinx_toolbox_experimental.missing_xref - sphinx_toolbox_experimental.changelog - latex_mu tox_unmanaged: - testenv dict2css-0.3.0.post1/requirements.txt000066400000000000000000000000761452735053000175700ustar00rootroot00000000000000# css-parser>=1.0.6 cssutils>=2.2.0 domdf-python-tools>=2.2.0 dict2css-0.3.0.post1/stubs.txt000066400000000000000000000000741452735053000162030ustar00rootroot00000000000000git+https://github.com/domdfcoding/pytest-regressions-stubs dict2css-0.3.0.post1/tests/000077500000000000000000000000001452735053000154435ustar00rootroot00000000000000dict2css-0.3.0.post1/tests/__init__.py000066400000000000000000000000001452735053000175420ustar00rootroot00000000000000dict2css-0.3.0.post1/tests/conftest.py000066400000000000000000000000431452735053000176370ustar00rootroot00000000000000pytest_plugins = ("coincidence", ) dict2css-0.3.0.post1/tests/requirements.txt000066400000000000000000000002761452735053000207340ustar00rootroot00000000000000coincidence>=0.2.0 coverage>=5.1 coverage-pyver-pragma>=0.2.1 importlib-metadata>=3.6.0 iniconfig!=1.1.0,>=1.0.1 pytest>=6.0.0 pytest-cov>=2.8.1 pytest-randomly>=3.7.0 pytest-timeout>=1.4.2 dict2css-0.3.0.post1/tests/test_dict2css.py000066400000000000000000000126321452735053000205760ustar00rootroot00000000000000# stdlib from typing import Dict, Mapping, MutableMapping # 3rd party import cssutils # type: ignore import pytest from coincidence.regressions import AdvancedDataRegressionFixture, AdvancedFileRegressionFixture from domdf_python_tools.paths import PathPlus from domdf_python_tools.stringlist import StringList from domdf_python_tools.words import TAB # this package from dict2css import IMPORTANT, Style, StyleSheet, dump, dumps, load, loads, make_style from dict2css.helpers import em, px, rem from dict2css.serializer import CSSSerializer def test_stylesheet(advanced_file_regression: AdvancedFileRegressionFixture): serializer = CSSSerializer(indent=" ", trailing_semicolon=True) with serializer.use(): sheet = StyleSheet() # Body width sheet.add_style(".wy-nav-content", {"max-width": (px(1200), IMPORTANT)}) # Spacing between list items sheet.add_style("li p:last-child", {"margin-bottom": (px(12), IMPORTANT)}) # Smooth scrolling between sections sheet.add_style("html", {"scroll-behavior": "smooth"}) stylesheet = sheet.tostring().replace('}', "}\n") advanced_file_regression.check(stylesheet, extension=".css") @pytest.mark.parametrize("trailing_semicolon", [True, False]) @pytest.mark.parametrize("indent_closing_brace", [True, False]) @pytest.mark.parametrize("indent", [TAB, " ", " "]) def test_dumps( advanced_file_regression: AdvancedFileRegressionFixture, trailing_semicolon: bool, indent_closing_brace: bool, indent: str, tmp_pathplus: PathPlus ): stylesheet: Dict[str, Style] = { ".wy-nav-content": {"max-width": (rem(1200), IMPORTANT)}, "li p:last-child": { "margin-bottom": (em(12), IMPORTANT), "margin-top": em(6), }, "html": {"scroll-behavior": "smooth"}, } css = dumps( stylesheet, indent=indent, trailing_semicolon=trailing_semicolon, indent_closing_brace=indent_closing_brace ) advanced_file_regression.check(css, extension=".css") output_file = tmp_pathplus / "style.css" with output_file.open('w') as fp: dump( stylesheet, fp, indent=indent, trailing_semicolon=trailing_semicolon, indent_closing_brace=indent_closing_brace ) advanced_file_regression.check_file(output_file) dump( stylesheet, output_file, indent=indent, trailing_semicolon=trailing_semicolon, indent_closing_brace=indent_closing_brace ) advanced_file_regression.check_file(output_file) def test_make_style(): style: cssutils.css.CSSStyleRule = make_style("li p:last-child", {"max-width": (rem(1200), IMPORTANT)}) assert str(style.selectorText) == "li p:last-child" assert StringList(style.cssText) == [ "li p:last-child {", " max-width: 1200rem !important", " }", ] serializer = CSSSerializer(trailing_semicolon=True) with serializer.use(): assert StringList(style.cssText) == [ "li p:last-child {", "\tmax-width: 1200rem !important;", '}', ] def test_dump_minify(advanced_file_regression: AdvancedFileRegressionFixture, tmp_pathplus: PathPlus): stylesheet: Dict[str, Style] = { ".wy-nav-content": {"max-width": (rem(1200), IMPORTANT)}, "li p:last-child": { "margin-bottom": (em(12), IMPORTANT), "margin-top": em(6), }, "html": {"scroll-behavior": "smooth"}, } css = dumps(stylesheet, minify=True) advanced_file_regression.check(css, extension=".css") output_file = tmp_pathplus / "style.css" with output_file.open('w') as fp: dump(stylesheet, fp, minify=True) advanced_file_regression.check_file(output_file) dump(stylesheet, output_file, minify=True) advanced_file_regression.check_file(output_file) def test_dumps_media(advanced_file_regression: AdvancedFileRegressionFixture, tmp_pathplus: PathPlus): stylesheet: Dict[str, MutableMapping] = { ".wy-nav-content": {"max-width": (rem(1200), IMPORTANT)}, "li p:last-child": { "margin-bottom": (em(12), IMPORTANT), "margin-top": em(6), }, "html": {"scroll-behavior": "smooth"}, "@media screen and (min-width: 870px)": {"li p:last-child": {"max-width": (rem(1200), IMPORTANT)}}, } css = dumps(stylesheet, trailing_semicolon=True) advanced_file_regression.check(css, extension=".css") output_file = tmp_pathplus / "style.css" with output_file.open('w') as fp: dump(stylesheet, fp, trailing_semicolon=True) advanced_file_regression.check_file(output_file) dump(stylesheet, output_file, trailing_semicolon=True) advanced_file_regression.check_file(output_file) def test_loads(advanced_data_regression: AdvancedDataRegressionFixture, tmp_pathplus: PathPlus): style = [ ".wy-nav-content {", " max-width: 1200rem !important;", " }", '', "li p:last-child {", " margin-bottom: 12em !important;", " margin-top: 6em;", " }", '', "@media screen {", " html {", " scroll-behavior: smooth;", " }", '}', ] advanced_data_regression.check(loads('\n'.join(style))) stylesheet: Mapping[str, Mapping] = { ".wy-nav-content": {"max-width": (rem(1200), IMPORTANT)}, "li p:last-child": { "margin-bottom": (em(12), IMPORTANT), "margin-top": em(6), }, "html": {"scroll-behavior": "smooth"}, "@media screen and (min-width: 870px)": {"li p:last-child": {"max-width": (rem(1200), IMPORTANT)}}, } assert loads(dumps(stylesheet)) == stylesheet style_file = tmp_pathplus / "style.css" dump(stylesheet, style_file) assert load(style_file) == stylesheet with style_file.open() as fp: assert load(fp) == stylesheet dict2css-0.3.0.post1/tests/test_dict2css_/000077500000000000000000000000001452735053000203575ustar00rootroot00000000000000dict2css-0.3.0.post1/tests/test_dict2css_/test_dump_minify.css000066400000000000000000000002071452735053000244470ustar00rootroot00000000000000.wy-nav-content{max-width:1200rem !important}li p:last-child{margin-bottom:12em !important;margin-top:6em}html{scroll-behavior:smooth} dict2css-0.3.0.post1/tests/test_dict2css_/test_dumps____False_False_.css000066400000000000000000000002411452735053000262750ustar00rootroot00000000000000.wy-nav-content { max-width: 1200rem !important } li p:last-child { margin-bottom: 12em !important; margin-top: 6em } html { scroll-behavior: smooth } dict2css-0.3.0.post1/tests/test_dict2css_/test_dumps____False_True_.css000066400000000000000000000002441452735053000261650ustar00rootroot00000000000000.wy-nav-content { max-width: 1200rem !important; } li p:last-child { margin-bottom: 12em !important; margin-top: 6em; } html { scroll-behavior: smooth; } dict2css-0.3.0.post1/tests/test_dict2css_/test_dumps____True_False_.css000066400000000000000000000002471452735053000261700ustar00rootroot00000000000000.wy-nav-content { max-width: 1200rem !important } li p:last-child { margin-bottom: 12em !important; margin-top: 6em } html { scroll-behavior: smooth } dict2css-0.3.0.post1/tests/test_dict2css_/test_dumps____True_True_.css000066400000000000000000000002521452735053000260510ustar00rootroot00000000000000.wy-nav-content { max-width: 1200rem !important; } li p:last-child { margin-bottom: 12em !important; margin-top: 6em; } html { scroll-behavior: smooth; } dict2css-0.3.0.post1/tests/test_dict2css_/test_dumps______False_False_.css000066400000000000000000000002511452735053000265740ustar00rootroot00000000000000.wy-nav-content { max-width: 1200rem !important } li p:last-child { margin-bottom: 12em !important; margin-top: 6em } html { scroll-behavior: smooth } dict2css-0.3.0.post1/tests/test_dict2css_/test_dumps______False_True_.css000066400000000000000000000002541452735053000264640ustar00rootroot00000000000000.wy-nav-content { max-width: 1200rem !important; } li p:last-child { margin-bottom: 12em !important; margin-top: 6em; } html { scroll-behavior: smooth; } dict2css-0.3.0.post1/tests/test_dict2css_/test_dumps______True_False_.css000066400000000000000000000002651452735053000264660ustar00rootroot00000000000000.wy-nav-content { max-width: 1200rem !important } li p:last-child { margin-bottom: 12em !important; margin-top: 6em } html { scroll-behavior: smooth } dict2css-0.3.0.post1/tests/test_dict2css_/test_dumps______True_True_.css000066400000000000000000000002701452735053000263470ustar00rootroot00000000000000.wy-nav-content { max-width: 1200rem !important; } li p:last-child { margin-bottom: 12em !important; margin-top: 6em; } html { scroll-behavior: smooth; } dict2css-0.3.0.post1/tests/test_dict2css_/test_dumps__t_False_False_.css000066400000000000000000000002351452735053000263250ustar00rootroot00000000000000.wy-nav-content { max-width: 1200rem !important } li p:last-child { margin-bottom: 12em !important; margin-top: 6em } html { scroll-behavior: smooth } dict2css-0.3.0.post1/tests/test_dict2css_/test_dumps__t_False_True_.css000066400000000000000000000002401452735053000262060ustar00rootroot00000000000000.wy-nav-content { max-width: 1200rem !important; } li p:last-child { margin-bottom: 12em !important; margin-top: 6em; } html { scroll-behavior: smooth; } dict2css-0.3.0.post1/tests/test_dict2css_/test_dumps__t_True_False_.css000066400000000000000000000002401452735053000262060ustar00rootroot00000000000000.wy-nav-content { max-width: 1200rem !important } li p:last-child { margin-bottom: 12em !important; margin-top: 6em } html { scroll-behavior: smooth } dict2css-0.3.0.post1/tests/test_dict2css_/test_dumps__t_True_True_.css000066400000000000000000000002431452735053000260760ustar00rootroot00000000000000.wy-nav-content { max-width: 1200rem !important; } li p:last-child { margin-bottom: 12em !important; margin-top: 6em; } html { scroll-behavior: smooth; } dict2css-0.3.0.post1/tests/test_dict2css_/test_dumps_media.css000066400000000000000000000004021452735053000244130ustar00rootroot00000000000000.wy-nav-content { max-width: 1200rem !important; } li p:last-child { margin-bottom: 12em !important; margin-top: 6em; } html { scroll-behavior: smooth; } @media screen and (min-width: 870px) { li p:last-child { max-width: 1200rem !important; } } dict2css-0.3.0.post1/tests/test_dict2css_/test_loads.yml000066400000000000000000000002701452735053000232420ustar00rootroot00000000000000.wy-nav-content: max-width: - 1200rem - important '@media screen': html: scroll-behavior: smooth li p:last-child: margin-bottom: - 12em - important margin-top: 6em dict2css-0.3.0.post1/tests/test_dict2css_/test_stylesheet.css000066400000000000000000000002201452735053000243130ustar00rootroot00000000000000.wy-nav-content { max-width: 1200px !important; } li p:last-child { margin-bottom: 12px !important; } html { scroll-behavior: smooth; } dict2css-0.3.0.post1/tox.ini000066400000000000000000000152631452735053000156230ustar00rootroot00000000000000# This file is managed by 'repo_helper'. # You may add new sections, but any changes made to the following sections will be lost: # * tox # * envlists # * testenv:.package # * testenv:py313-dev # * testenv:py312-dev # * testenv:py312 # * testenv:docs # * testenv:build # * testenv:lint # * testenv:perflint # * testenv:mypy # * testenv:pyup # * testenv:coverage # * flake8 # * coverage:run # * coverage:report # * check-wheel-contents # * pytest [tox] envlist = py36 py37 py38 py39 py310 py311 py312 py313-dev pypy36 pypy37 pypy38 pypy39 mypy build skip_missing_interpreters = True isolated_build = True requires = pip>=21,!=22.2 tox-envlist>=0.2.1 tox~=3.0 virtualenv!=20.16.0 [envlists] test = py36 py37 py38 py39 py310 py311 py312 py313-dev pypy36 pypy37 pypy38 pypy39 qa = mypy, lint cov = py38, coverage [testenv:.package] setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 [testenv:py313-dev] setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 [testenv:py312] setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 [testenv:docs] setenv = SHOW_TODOS = 1 passenv = SPHINX_BUILDER basepython = python3.8 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 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.8 changedir = {toxinidir} ignore_errors = True skip_install = True deps = 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,<=1.2.2 flake8-pyi>=20.10.0,<=22.8.0 flake8-pytest-style>=1.3.0 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-rst-docstrings-sphinx.git git+https://github.com/domdfcoding/flake8-rst-docstrings.git git+https://github.com/python-formate/flake8-unused-arguments.git@magic-methods git+https://github.com/python-formate/flake8-missing-annotations.git pydocstyle>=6.0.0 pygments>=2.7.1 importlib_metadata<4.5.0; python_version<'3.8' commands = python3 -m flake8_rst_docstrings_sphinx dict2css tests --allow-toolbox {posargs} [testenv:perflint] basepython = python3.8 changedir = {toxinidir} ignore_errors = True skip_install = True deps = perflint commands = python3 -m perflint dict2css {posargs} [testenv:mypy] basepython = python3.8 ignore_errors = True changedir = {toxinidir} deps = mypy==0.971 -r{toxinidir}/tests/requirements.txt -r{toxinidir}/stubs.txt commands = mypy dict2css tests {posargs} [testenv:pyup] basepython = python3.8 skip_install = True ignore_errors = True changedir = {toxinidir} deps = pyupgrade-directories commands = pyup_dirs dict2css tests --py36-plus --recursive [testenv:coverage] basepython = python3.8 skip_install = True ignore_errors = True whitelist_externals = /bin/bash passenv = COV_PYTHON_VERSION COV_PLATFORM COV_PYTHON_IMPLEMENTATION * changedir = {toxinidir} deps = coverage>=5 coverage_pyver_pragma>=0.2.1 commands = /bin/bash -c "rm -rf htmlcov" coverage html /bin/bash -c "DISPLAY=:0 firefox 'htmlcov/index.html'" [flake8] max-line-length = 120 select = E111 E112 E113 E121 E122 E125 E127 E128 E129 E131 E133 E201 E202 E203 E211 E222 E223 E224 E225 E225 E226 E227 E228 E231 E241 E242 E251 E261 E262 E265 E271 E272 E303 E304 E306 E402 E502 E703 E711 E712 E713 E714 E721 W291 W292 W293 W391 W504 YTT101 YTT102 YTT103 YTT201 YTT202 YTT203 YTT204 YTT301 YTT302 YTT303 STRFTIME001 STRFTIME002 SXL001 PT001 PT002 PT003 PT006 PT007 PT008 PT009 PT010 PT011 PT012 PT013 PT014 PT015 PT016 PT017 PT018 PT019 PT020 PT021 RST201 RST202 RST203 RST204 RST205 RST206 RST207 RST208 RST210 RST211 RST212 RST213 RST214 RST215 RST216 RST217 RST218 RST219 RST299 RST301 RST302 RST303 RST304 RST305 RST306 RST399 RST401 RST499 RST900 RST901 RST902 RST903 Q001 Q002 Q003 A001 A002 TYP001 TYP002 TYP003 TYP004 TYP005 TYP006 ENC001 ENC002 ENC003 ENC004 ENC011 ENC012 ENC021 ENC022 ENC023 ENC024 ENC025 ENC026 Y001,Y002 Y003 Y004 Y005 Y006 Y007 Y008 Y009 Y010 Y011 Y012 Y013 Y014 Y015 Y090 Y091 NQA001 NQA002 NQA003 NQA004 NQA005 NQA102 NQA103 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 autosummary-widths envvar extras-require license license-info rst-roles = choosealicense per-file-ignores = tests/*: D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002 */*.pyi: E301 E302 E305 D100 D101 D102 D103 D104 D106 D201 D204 D207 D208 D209 D210 D211 D212 D213 D214 D215 D300 D301 D400 D402 D403 D404 D415 D417 DALL000 SLOT000 SLOT001 SLOT002 pytest-parametrize-names-type = csv inline-quotes = " multiline-quotes = """ docstring-quotes = """ count = True min_python_version = 3.6.1 unused-arguments-ignore-abstract-functions = True unused-arguments-ignore-overload-functions = True unused-arguments-ignore-magic-methods = True unused-arguments-ignore-variadic-names = True [coverage:run] plugins = coverage_pyver_pragma [coverage:report] fail_under = 100 show_missing = True exclude_lines = raise AssertionError raise NotImplementedError if 0: if False: if TYPE_CHECKING: if typing.TYPE_CHECKING: if __name__ == .__main__.: [check-wheel-contents] ignore = W002 toplevel = dict2css package = dict2css [pytest] addopts = --color yes --durations 25 timeout = 300 [testenv] setenv = PYTHONDEVMODE=1 PIP_DISABLE_PIP_VERSION_CHECK=1 deps = -r{toxinidir}/tests/requirements.txt commands = python --version python -m pip uninstall css-parser -y python -m pytest --cov=dict2css -r aR tests/ {posargs} python -m pip install "css-parser>=1.0.6" python -m pytest --cov=dict2css -r aR tests/ --cov-append {posargs}