Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,20 +54,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
10 changes: 10 additions & 0 deletions .github/workflows/prek.yml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ repos:
hooks:
- id: pyupgrade
args: ["--py39-plus"]

- repo: https://github.com/pycqa/flake8
rev: 7.3.0
hooks:
- id: flake8
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/env python

import io
import os
import re
import sys
Expand Down Expand Up @@ -42,7 +41,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 ""
Expand All @@ -66,7 +65,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

Expand Down