|
| 1 | +exclude: ".*(.csv|.fits|.fts|.fit|.header|.txt|tca.*|.json|.asdf)$|^CITATION.rst|(^|/)data/test(/|$)" |
1 | 2 | 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: 3.7.9 |
| 3 | + # This should be before any formatting hooks like isort |
| 4 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 5 | + rev: "v0.12.2" |
24 | 6 | hooks: |
25 | | - - id: flake8 |
26 | | - args: ['--count', '--select', 'C90,E,W,F'] |
27 | | - exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|__init__.py|docs/conf.py)$" |
28 | | - - repo: https://github.com/myint/autoflake |
29 | | - rev: v1.4 |
30 | | - hooks: |
31 | | - - id: autoflake |
32 | | - args: ['--in-place', '--remove-all-unused-imports', '--remove-unused-variable'] |
33 | | - exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|__init__.py|docs/conf.py)$" |
34 | | - - repo: https://github.com/timothycrosley/isort |
35 | | - rev: 5.12.0 |
| 7 | + - id: ruff-check |
| 8 | + args: ["--fix"] |
| 9 | + # Run the formatter. |
| 10 | + - id: ruff-format |
| 11 | + - repo: https://github.com/PyCQA/isort |
| 12 | + rev: 6.0.1 |
36 | 13 | hooks: |
37 | 14 | - id: isort |
38 | | - args: ['--sp','setup.cfg'] |
39 | | - exclude: ".*(.fits|.fts|.fit|.txt|tca.*|extern.*|.rst|.md|cm/__init__.py|sunpy/extern|docs/conf.py)$" |
40 | 15 | - repo: https://github.com/pre-commit/pre-commit-hooks |
41 | | - rev: v2.4.0 |
| 16 | + rev: v5.0.0 |
42 | 17 | hooks: |
43 | 18 | - id: check-ast |
44 | 19 | - id: check-case-conflict |
45 | 20 | - id: trailing-whitespace |
46 | | - exclude: ".*(.fits|.fts|.fit|.txt)$" |
47 | 21 | - id: check-yaml |
48 | 22 | - id: debug-statements |
49 | 23 | - id: check-added-large-files |
| 24 | + args: ["--enforce-all", "--maxkb=1054"] |
| 25 | + exclude: "" |
50 | 26 | - id: end-of-file-fixer |
51 | | - exclude: ".*(.fits|.fts|.fit|.txt|tca.*)$" |
52 | 27 | - id: mixed-line-ending |
53 | | - exclude: ".*(.fits|.fts|.fit|.txt|tca.*)$" |
| 28 | + - repo: https://github.com/codespell-project/codespell |
| 29 | + rev: v2.4.1 |
| 30 | + hooks: |
| 31 | + - id: codespell |
| 32 | + additional_dependencies: |
| 33 | + - tomli |
| 34 | + args: ["--write-changes"] |
| 35 | + |
| 36 | +ci: |
| 37 | + autofix_prs: false |
| 38 | + autoupdate_schedule: "quarterly" |
0 commit comments