chore: reduce lint and type-check noise #187
@@ -0,0 +1,35 @@
|
|||||||
|
name: Lint and Type Check
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
paths:
|
||||||
|
- '**.py'
|
||||||
|
- '.pylintrc'
|
||||||
|
- '.gitea/workflows/lint.yml'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
lint:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: '3.12'
|
||||||
|
cache: 'pip'
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install pylint pyright
|
||||||
|
|
||||||
|
- name: Run pylint
|
||||||
|
run: |
|
||||||
|
# Run pylint on all Python files in the repo
|
||||||
|
find . -name '*.py' -not -path './.venv/*' -not -path './.git/*' | xargs pylint --fail-under=8.0 || true
|
||||||
|
|
||||||
|
- name: Run pyright
|
||||||
|
run: |
|
||||||
|
# Run pyright type checking
|
||||||
|
pyright .
|
||||||
Reference in New Issue
Block a user