diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 48a91b5..cae6aa2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -54,27 +54,14 @@ jobs: run: | ./runtests.py - flake8: + pre-commit: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Set up Python - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v3 with: - python-version: '3.9' - - uses: actions/cache@v2 - with: - path: ~/.cache/pip - key: ${{ runner.os }}-pip-${{ '3.9' }}-${{ hashFiles('requirements*.txt') }} - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install -e . - pip install -r requirements-dev.txt - - name: Lint with flake8 - run: | - flake8 --version - flake8 . + python-version: "3.10" + - uses: pre-commit/action@v3.0.0 check-manifest: runs-on: ubuntu-latest @@ -92,7 +79,7 @@ jobs: run: | python -m pip install --upgrade pip pip install -e . - pip install -r requirements-dev.txt + pip install checkmanifest - name: check-manifest run: | check-manifest diff --git a/requirements-dev.txt b/requirements-dev.txt index 2a83395..5c93f13 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -1,2 +1,3 @@ -flake8==3.8.4 check-manifest +ruff +black diff --git a/setup.cfg b/setup.cfg index afa6f5b..1168f9e 100644 --- a/setup.cfg +++ b/setup.cfg @@ -39,7 +39,3 @@ where = src [options.package_data] mailer = locale/*/LC_MESSAGES/*.* - -[flake8] -max-line-length = 100 -exclude = src/mailer/migrations,build,.tox diff --git a/tox.ini b/tox.ini index 19aa765..6210da1 100644 --- a/tox.ini +++ b/tox.ini @@ -18,15 +18,12 @@ basepython = commands = test: coverage run ./runtests.py - flake: flake8 --statistics --benchmark checkmanifest: check-manifest -allowlist_externals = flake8 deps = coverage -r requirements-test.txt -e . - flake8: -r requirements-dev.txt - checkmanifest: -r requirements-dev.txt + checkmanifest: checkmanifest django22: Django==2.2.19 django30: Django==3.0.14 django31: Django==3.1.12