Skip to content

Update black requirement from ~=24.8 to ~=24.10 #134

Update black requirement from ~=24.8 to ~=24.10

Update black requirement from ~=24.8 to ~=24.10 #134

Workflow file for this run

---
name: "Python Find Dead Code"
on: [pull_request]
jobs:
lint:
name: "Find Dead Code"
runs-on: ubuntu-latest
steps:
- name: "Checkout code"
uses: actions/checkout@v4
- run: |
echo "package=$(ls -F | grep \/$ | grep -v "scripts\|examples\|tests\|config" | sed -n "s/\///g;1p")" >> $GITHUB_ENV
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version-file: 'pyproject.toml'
- name: "Cache pip"
uses: actions/cache@v4
with:
# This path is specific to Ubuntu
path: ~/.cache/pip
# Look to see if there is a cache hit for the corresponding requirements file
key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-
- name: "Install dependencies"
run: |
python -m pip install --upgrade pip
if [ -f requirements-test.txt ]; then
scripts/install_requirements requirements-test.txt "${{ secrets.ADMIN_GITHUB_TOKEN }}"
elif [ -f requirements-dev.txt ]; then
scripts/install_requirements requirements-dev.txt "${{ secrets.ADMIN_GITHUB_TOKEN }}"
elif [ -f requirements.txt ]; then
scripts/install_requirements requirements.txt "${{ secrets.ADMIN_GITHUB_TOKEN }}"
fi
pip install flake8-eradicate
if [ -d custom_components ]; then
echo '"""Stub."""' >custom_components/__init__.py
fi
- name: "Lint with flake8 & mypy"
run: |
flake8 ${{ env.package }} tests
mypy --warn-unreachable ${{ env.package }} tests