diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ab57a03..5bcc432 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,20 +49,3 @@ jobs: # - name: Upload coverage to coveralls # run: | # coveralls - - lint: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - - name: Set up Python 3.12 - uses: actions/setup-python@v5 - with: - python-version: '3.12' - - - name: Install tox and flake8 packages - run: pip install tox tox-gh-actions flake8 - - - name: Lint - run: tox -e flake8 diff --git a/.github/workflows/prek.yml b/.github/workflows/prek.yml new file mode 100644 index 0000000..be7d6d9 --- /dev/null +++ b/.github/workflows/prek.yml @@ -0,0 +1,10 @@ +name: Check pre-commit hooks + +on: [push, pull_request] + +jobs: + prek: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v5.0.0 + - uses: j178/prek-action@v1.0.11 diff --git a/setup.py b/setup.py index aa0c507..c57b4e2 100755 --- a/setup.py +++ b/setup.py @@ -1,6 +1,5 @@ #!/usr/bin/env python -import io import os import re import sys @@ -41,7 +40,7 @@ def read(fname, fail_silently=False): filepath = os.path.join(os.path.dirname(__file__), fname) with open(filepath, encoding="utf8") as f: return f.read() - except: + except Exception: if not fail_silently: raise return "" @@ -65,7 +64,7 @@ def extra_requirements(cls, glob_pattern): pattern = os.path.join(os.path.dirname(__file__), glob_pattern) requirements = {} for path in glob.glob(pattern): - name = path[len(before) : -len(after)] + name = path[len(before): -len(after)] requirements[name] = cls.requirements(path) return requirements