Skip to content

Commit

Permalink
chore: run pyupgrade on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bdraco committed Jun 9, 2024
1 parent 9b9ec63 commit 21b9ac3
Show file tree
Hide file tree
Showing 9 changed files with 136 additions and 142 deletions.
54 changes: 27 additions & 27 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ name: CD - Publish Docs

on:
release:
types: [ published ]
types: [published]
workflow_dispatch:

concurrency:
Expand All @@ -29,29 +29,29 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Check repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '${{ env.DEFAULT_PYTHON }}'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r dev-requirements.txt
pip install -e ".[dev]"
- name: Get current version
run: echo "PYUFP_VERSION=$(git describe --tags --abbrev=0 | sed "s/\(v[0-9]\+\.[0-9]\+\.\)[0-9]\+/\1x/")" >> $GITHUB_ENV

- name: Setup Git
run: |
git config --global user.name "GitHub Action"
git config --global user.email "[email protected]"
- name: Build and deploy docs
run: mike deploy --push --update-aliases ${{ env.PYUFP_VERSION }} latest
- name: Check repo
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "${{ env.DEFAULT_PYTHON }}"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt -r dev-requirements.txt
pip install -e ".[dev]"
- name: Get current version
run: echo "PYUFP_VERSION=$(git describe --tags --abbrev=0 | sed "s/\(v[0-9]\+\.[0-9]\+\.\)[0-9]\+/\1x/")" >> $GITHUB_ENV

- name: Setup Git
run: |
git config --global user.name "GitHub Action"
git config --global user.email "[email protected]"
- name: Build and deploy docs
run: mike deploy --push --update-aliases ${{ env.PYUFP_VERSION }} latest
12 changes: 5 additions & 7 deletions docs/overrides/main.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
{% extends "base.html" %}

{% block outdated %}
You're not viewing the latest version.
<a href="{{ '../' ~ base_url }}">
<strong>Click here to go to latest.</strong>
</a>
{% extends "base.html" %} {% block outdated %} You're not viewing the latest
version.
<a href="{{ '../' ~ base_url }}">
<strong>Click here to go to latest.</strong>
</a>
{% endblock %}
17 changes: 7 additions & 10 deletions docs/overrides/partials/toc-item.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{% if not page.meta.toc_depth or toc_item.level <= page.meta.toc_depth %}
<li class="md-nav__item">
<a href="{{ toc_item.url }}" class="md-nav__link">
{{ toc_item.title }}
</a>
<a href="{{ toc_item.url }}" class="md-nav__link"> {{ toc_item.title }} </a>
{% if toc_item.children %}
<nav class="md-nav" aria-label="{{ toc_item.title }}">
<ul class="md-nav__list">
{% for toc_item in toc_item.children %}
{% include "partials/toc-item.html" %}
{% endfor %}
</ul>
</nav>
<nav class="md-nav" aria-label="{{ toc_item.title }}">
<ul class="md-nav__list">
{% for toc_item in toc_item.children %} {% include
"partials/toc-item.html" %} {% endfor %}
</ul>
</nav>
{% endif %}
</li>
{% endif %}
Loading

0 comments on commit 21b9ac3

Please sign in to comment.