Skip to content

refactor: improve type hints #266

refactor: improve type hints

refactor: improve type hints #266

Workflow file for this run

# As per the example on https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions
name: Python codestyling
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13']
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
# stop the build if there are code styling problems. The GitHub editor is 127 chars wide.
flake8 . --count --max-line-length=127 --show-source --statistics
- name: Check type hints
run: |
pip install mypy lxml-stubs
mypy .
- name: Ensure library work without docxcompose
run: |
pip uninstall -y docxcompose
python -c "from docxtpl import *"