|
| 1 | +ci: |
| 2 | + autofix_prs: false |
| 3 | + autoupdate_schedule: quarterly |
| 4 | + |
1 | 5 | repos: |
2 | | - # The warnings/errors we check for here are: |
3 | | - # E101 - mix of tabs and spaces |
4 | | - # W191 - use of tabs |
5 | | - # W291 - trailing whitespace |
6 | | - # W292 - no newline at end of file |
7 | | - # W293 - trailing whitespace |
8 | | - # W391 - blank line at end of file |
9 | | - # E111 - 4 spaces per indentation level |
10 | | - # E112 - 4 spaces per indentation level |
11 | | - # E113 - 4 spaces per indentation level |
12 | | - # E303 - too many blank lines (3) |
13 | | - # E304 - blank lines found after function decorator |
14 | | - # E305 - expected 2 blank lines after class or function definition |
15 | | - # E306 - expected 1 blank line before a nested definition |
16 | | - # E502 - the backslash is redundant between brackets |
17 | | - # E722 - do not use bare except |
18 | | - # E901 - SyntaxError or IndentationError |
19 | | - # E902 - IOError |
20 | | - # F822: undefined name in __all__ |
21 | | - # F823: local variable name referenced before assignment |
22 | | - - repo: https://github.com/pycqa/flake8 |
23 | | - rev: 6.0.0 |
| 6 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 7 | + rev: "v0.12.7" |
24 | 8 | hooks: |
25 | | - - id: flake8 |
26 | | - additional_dependencies: [flake8-use-pathlib] |
27 | | - args: ['--count', '--select', 'E101,W191,W291,W292,W293,W391,E111,E112,E113,E303,E304,E306,E502,E722,E901,E902,F822,F823,PL100,PL102,PL103,PL104,PL105,PL110,PL112,PL113,PL18,PL120,PL122,PL123'] |
| 9 | + - id: ruff |
| 10 | + args: ["--fix"] |
| 11 | + |
| 12 | + - repo: https://github.com/PyCQA/isort |
| 13 | + rev: 6.0.1 |
| 14 | + hooks: |
| 15 | + - id: isort |
| 16 | + name: isort |
| 17 | + entry: isort |
| 18 | + require_serial: true |
| 19 | + language: python |
| 20 | + types: |
| 21 | + - python |
28 | 22 |
|
29 | 23 | - repo: https://github.com/pre-commit/pre-commit-hooks |
30 | | - rev: v4.4.0 |
| 24 | + rev: v5.0.0 |
31 | 25 | hooks: |
32 | 26 | - id: check-ast |
33 | 27 | - id: check-case-conflict |
34 | 28 | - id: trailing-whitespace |
35 | | - exclude: ".*(.fits|.fts|.fit|.txt|.pro)$|pydrad/configure/(templates|data)/.*" |
| 29 | + exclude: ".*(.fits|.fts|.fit|.txt|.pro|.asdf|.json|.dat|.cfg|.h|.bat)$" |
36 | 30 | - id: check-yaml |
37 | 31 | - id: debug-statements |
38 | 32 | - id: check-added-large-files |
39 | 33 | - id: end-of-file-fixer |
40 | | - exclude: ".*(.fits|.fts|.fit|.txt|.pro|.bib|tca.*)$|pydrad/configure/(templates|data)/.*" |
| 34 | + exclude: ".*(.fits|.fts|.fit|.txt|.pro|.asdf|.json|.bib|tca.*|.dat|.cfg|.h|.bat)$" |
41 | 35 | - id: mixed-line-ending |
42 | | - exclude: ".*(.fits|.fts|.fit|.txt|.bib|tca.*)$|pydrad/configure/(templates|data)/.*" |
43 | | - |
44 | | - - repo: https://github.com/asottile/pyupgrade |
45 | | - rev: v3.3.1 |
46 | | - hooks: |
47 | | - - id: pyupgrade |
48 | | - args: [--keep-runtime-typing, --py38-plus] |
49 | | - files: ^fiasco/ |
| 36 | + exclude: ".*(.fits|.fts|.fit|.txt|.bib|.pro|.asdf|.json|tca.*|.dat|.cfg|.h|.bat)$" |
50 | 37 |
|
51 | 38 | - repo: https://github.com/codespell-project/codespell |
52 | | - rev: v2.2.2 |
| 39 | + rev: v2.4.1 |
53 | 40 | hooks: |
54 | 41 | - id: codespell |
55 | | - args: ['--config setup.cfg'] |
56 | | - |
57 | | - - repo: https://github.com/MarcoGorelli/absolufy-imports |
58 | | - rev: v0.3.1 |
59 | | - hooks: |
60 | | - - id: absolufy-imports |
61 | | - |
62 | | - - repo: https://github.com/PyCQA/isort |
63 | | - rev: 5.12.0 |
64 | | - hooks: |
65 | | - - id: isort |
66 | | - name: isort |
67 | | - entry: isort |
68 | | - require_serial: true |
69 | | - language: python |
70 | | - types: |
71 | | - - python |
| 42 | + additional_dependencies: |
| 43 | + - tomli |
0 commit comments