Skip to content
Merged
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: 17 additions & 0 deletions .github/workflows/lint_python.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: lint_python
on: [pull_request, push]
jobs:
lint_python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- run: pip install black codespell flake8 isort pytest pyupgrade
- run: black --check . || true
- run: codespell --quiet-level=2 # --ignore-words-list="" --skip=""
- run: flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
- run: isort --profile black . || true
- run: pip install -r requirements.txt || true
- run: pip install Flask Flask-SQLAlchemy psutil redis
- run: pytest .
- run: shopt -s globstar && pyupgrade --py36-plus **/*.py || true
1 change: 1 addition & 0 deletions tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

3 changes: 2 additions & 1 deletion tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ def test_file_lock():
try:
lock_copy.acquire()
except BlockingIOError as e:
assert e.__str__() == "[Errno 35] Resource temporarily unavailable"
errno = 11 if os.getenv("GITHUB_ACTIONS") else 35
assert str(e) == f"[Errno {errno}] Resource temporarily unavailable"

lock.release()
assert not lock_copy.acquire()
Expand Down