Skip to content

Commit c4959ff

Browse files
committed
build: reconfigure pre-commit the standard way
1 parent d06c2ef commit c4959ff

File tree

2 files changed

+11
-22
lines changed

2 files changed

+11
-22
lines changed

.pre-commit-config.yaml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,34 +6,23 @@ repos:
66
- id: end-of-file-fixer
77
- id: trailing-whitespace
88
exclude: \.svg$
9-
- repo: local
10-
# Using local repos because these won't work for me from remote repo -EJ
11-
# They're also more convenient because we install them via requirements.dev.txt
12-
# and they are then available on the command line as well as in pre-commit.
9+
- repo: https://github.com/PyCQA/isort
10+
rev: 6.0.1
1311
hooks:
1412
- id: isort
15-
name: isort
16-
entry: isort
17-
language: system
18-
types: [python]
19-
stages: [pre-commit]
13+
args: [--profile=black]
14+
- repo: https://github.com/psf/black
15+
rev: 24.10.0
16+
hooks:
2017
- id: black
21-
name: black
22-
entry: black
23-
language: system
24-
types: [python]
25-
stages: [pre-commit]
26-
# We do flake8 last since black fixes a lot of the stuff it complains about
18+
# We do flake8 after black since black fixes a lot of the stuff it complains about
2719
- repo: https://github.com/pycqa/flake8
2820
rev: 7.1.0
2921
hooks:
3022
- id: flake8
3123
# We do mypy last because it's the slowest of them all
32-
- repo: local
24+
- repo: https://github.com/pre-commit/mirrors-mypy
25+
rev: v1.16.1
3326
hooks:
3427
- id: mypy
35-
name: mypy
36-
entry: mypy
37-
language: system
38-
types: [python]
39-
stages: [pre-commit]
28+
additional_dependencies: [pydantic, numpy<2, types-requests, types-pyyaml, types-setuptools, types-tabulate, types-tqdm]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ Create a conda env, then `pip install -e .`
1010

1111
`ctc-segmenter align-single sample.txt sample.wav` which will output a [Praat TextGrid](https://www.fon.hum.uva.nl/praat/) with the word, and sentence level alignments.
1212

13-
You can then adjust the Praat TextGrid as necessary and run `ctc-segmenter extract-segments-from-textgrid sample.TextGrid sample.wav outdir` which will extract the segments and write them to the `outdir` directory along with a metadata file.
13+
You can then adjust the Praat TextGrid as necessary and run `ctc-segmenter extract-segments-from-textgrid sample.TextGrid sample.wav outdir` which will extract the segments and write them to the `outdir` directory along with a metadata file.

0 commit comments

Comments
 (0)