-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MRG: #224 from vocalpy/add-fix-linting
Add / fix linting
- Loading branch information
Showing
67 changed files
with
1,552 additions
and
1,999 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: lint | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: psf/black@stable | ||
with: | ||
options: "--line-length=120" | ||
src: "./src" | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: install libsndfile1 on ubuntu | ||
if: matrix.os == 'ubuntu-latest' | ||
run: sudo apt install libsndfile1 | ||
- name: install | ||
run: | | ||
pip install nox | ||
pip install '.[dev]' | ||
- name: isort lint | ||
uses: isort/isort-action@master | ||
with: | ||
configuration: "./src" | ||
- name: flake8 lint | ||
uses: py-actions/flake8@v2 | ||
with: | ||
max-line-length: "120" | ||
path: "./src" | ||
exclude: "./src/crowsetta/_vendor" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: "v4.4.0" | ||
hooks: | ||
- id: check-added-large-files | ||
- id: check-case-conflict | ||
- id: check-merge-conflict | ||
- id: check-symlinks | ||
- id: check-yaml | ||
- id: debug-statements | ||
- id: end-of-file-fixer | ||
- id: mixed-line-ending | ||
- id: name-tests-test | ||
args: ["--pytest-test-first"] | ||
- id: requirements-txt-fixer | ||
- id: trailing-whitespace | ||
|
||
# Autoremoves unused imports | ||
- repo: https://github.com/hadialqattan/pycln | ||
rev: v1.1.0 | ||
hooks: | ||
- id: pycln | ||
args: [--config=pyproject.toml] | ||
files: ^src/|^tests/ | ||
|
||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
files: ^src/|^tests/ | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 23.1.0 | ||
hooks: | ||
- id: black | ||
args: | ||
- --line-length=120 | ||
files: ^src/|^tests/ | ||
|
||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 4.0.1 | ||
hooks: | ||
- id: flake8 | ||
args: | ||
- "--max-line-length=120" | ||
files: ^src/|^tests/ | ||
additional_dependencies: &flake8-dependencies | ||
- flake8-bugbear |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
from .textgrid import TextGrid, MLF, IntervalTier, PointTier, Interval, Point | ||
from .textgrid import MLF, Interval, IntervalTier, Point, PointTier, TextGrid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
|
||
class TextGridError(Exception): | ||
pass | ||
pass |
Oops, something went wrong.