Skip to content

Commit 47945fe

Browse files
committed
Added pre-commit hooks and updated docs building
1 parent cdc09de commit 47945fe

File tree

2 files changed

+39
-31
lines changed

2 files changed

+39
-31
lines changed

.github/workflows/build_docs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ jobs:
1212

1313
steps:
1414
- run: sudo apt-get update && sudo apt-get install libgl1
15+
- run: /usr/local/bin/python -m pip install --upgrade pip
1516
- uses: actions/checkout@v1
1617
# Standard drop-in approach that should work for most people.
1718
- uses: ammaraskar/sphinx-action@master

.pre-commit-config.yaml

Lines changed: 38 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,46 @@
11
repos:
2-
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v4.0.1
4-
hooks:
5-
- id: check-docstring-first
6-
- id: end-of-file-fixer
7-
- id: trailing-whitespace
8-
- repo: https://github.com/asottile/setup-cfg-fmt
9-
rev: v1.20.0
10-
hooks:
11-
- id: setup-cfg-fmt
12-
- repo: https://github.com/PyCQA/flake8
13-
rev: 4.0.1
14-
hooks:
15-
- id: flake8
16-
additional_dependencies: [flake8-typing-imports>=1.9.0]
17-
- repo: https://github.com/myint/autoflake
18-
rev: v1.4
19-
hooks:
20-
- id: autoflake
21-
args: ["--in-place", "--remove-all-unused-imports"]
22-
- repo: https://github.com/PyCQA/isort
23-
rev: 5.10.1
24-
hooks:
25-
- id: isort
2+
# - repo: https://github.com/pre-commit/pre-commit-hooks
3+
# rev: v4.0.1
4+
# hooks:
5+
# - id: check-docstring-first
6+
# - id: end-of-file-fixer
7+
# - id: trailing-whitespace
8+
# - repo: https://github.com/asottile/setup-cfg-fmt
9+
# rev: v1.20.0
10+
# hooks:
11+
# - id: setup-cfg-fmt
12+
# - repo: https://github.com/PyCQA/flake8
13+
# rev: 4.0.1
14+
# hooks:
15+
# - id: flake8
16+
# additional_dependencies: [flake8-typing-imports>=1.9.0]
17+
# - repo: https://github.com/myint/autoflake
18+
# rev: v1.4
19+
# hooks:
20+
# - id: autoflake
21+
# args: ["--in-place", "--remove-all-unused-imports"]
22+
# - repo: https://github.com/PyCQA/isort
23+
# rev: 5.10.1
24+
# hooks:
25+
# - id: isort
26+
- repo: https://github.com/charliermarsh/ruff-pre-commit
27+
# Ruff version.
28+
rev: 'v0.0.257'
29+
hooks:
30+
- id: ruff
31+
args: [ --fix, --exit-non-zero-on-fix ]
2632
- repo: https://github.com/psf/black
27-
rev: 21.11b1
33+
rev: 22.3.0
2834
hooks:
2935
- id: black
30-
- repo: https://github.com/asottile/pyupgrade
31-
rev: v2.29.1
32-
hooks:
33-
- id: pyupgrade
34-
args: [--py38-plus, --keep-runtime-typing]
36+
args: [--line-length=79]
37+
# - repo: https://github.com/asottile/pyupgrade
38+
# rev: v2.29.1
39+
# hooks:
40+
# - id: pyupgrade
41+
# args: [--py38-plus, --keep-runtime-typing]
3542
- repo: https://github.com/tlambert03/napari-plugin-checks
36-
rev: v0.2.0
43+
rev: v0.3.0
3744
hooks:
3845
- id: napari-plugin-checks
3946
# https://mypy.readthedocs.io/en/stable/introduction.html

0 commit comments

Comments
 (0)