Skip to content

Commit

Permalink
Merge pull request #1 from eginhard/lint-overhaul
Browse files Browse the repository at this point in the history
Lint overhaul (pylint to ruff)
  • Loading branch information
eginhard authored Mar 6, 2024
2 parents f055a8a + 1961687 commit 24298da
Show file tree
Hide file tree
Showing 66 changed files with 291 additions and 877 deletions.
5 changes: 0 additions & 5 deletions .cardboardlint.yml

This file was deleted.

19 changes: 4 additions & 15 deletions .github/workflows/style_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,7 @@ jobs:
architecture: x64
cache: 'pip'
cache-dependency-path: 'requirements*'
- name: check OS
run: cat /etc/os-release
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y git make gcc
make system-deps
- name: Install/upgrade Python setup deps
run: python3 -m pip install --upgrade pip setuptools wheel
- name: Install TTS
run: |
python3 -m pip install .[all]
python3 setup.py egg_info
- name: Style check
run: make style
- name: Install/upgrade dev dependencies
run: python3 -m pip install -r requirements.dev.txt
- name: Lint check
run: make lint
32 changes: 12 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,19 @@
repos:
- repo: 'https://github.com/pre-commit/pre-commit-hooks'
rev: v2.3.0
- repo: "https://github.com/pre-commit/pre-commit-hooks"
rev: v4.5.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: 'https://github.com/psf/black'
rev: 22.3.0
# TODO: enable these later; there are plenty of violating
# files that need to be fixed first
# - id: end-of-file-fixer
# - id: trailing-whitespace
- repo: "https://github.com/psf/black"
rev: 23.12.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/pycqa/isort
rev: 5.8.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.0
hooks:
- id: isort
name: isort (python)
- id: isort
name: isort (cython)
types: [cython]
- id: isort
name: isort (pyi)
types: [pyi]
- repo: https://github.com/pycqa/pylint
rev: v2.8.2
hooks:
- id: pylint
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
Loading

0 comments on commit 24298da

Please sign in to comment.