|
| 1 | +exclude: ^(docs|tests|dev_scripts|.github) |
| 2 | + |
| 3 | +default_language_version: |
| 4 | + python: python3.11 |
| 5 | + |
| 6 | +ci: |
| 7 | + autoupdate_schedule: yearly |
| 8 | + skip: [flake8, autoflake, mypy] |
| 9 | + |
1 | 10 | repos: |
2 | | - - repo: https://github.com/myint/autoflake |
3 | | - rev: v1.4 |
| 11 | + |
| 12 | + - repo: https://github.com/astral-sh/ruff-pre-commit |
| 13 | + rev: v0.4.3 |
4 | 14 | hooks: |
5 | | - - id: autoflake |
6 | | - args: [--in-place, --remove-all-unused-imports, --remove-unused-variable, --ignore-init-module-imports] |
| 15 | + - id: ruff |
| 16 | + args: [--fix, --unsafe-fixes] |
| 17 | + |
7 | 18 | - repo: https://github.com/psf/black |
8 | | - rev: 21.4b2 |
| 19 | + rev: 24.2.0 |
9 | 20 | hooks: |
10 | | - - id: black |
11 | | - - repo: https://gitlab.com/pycqa/flake8 |
12 | | - rev: 3.9.1 |
13 | | - hooks: |
14 | | - - id: flake8 |
15 | | - args: [--max-line-length=125, "--extend-ignore=E203,W503"] |
16 | | - language_version: python3 |
| 21 | + - id: black |
| 22 | + |
17 | 23 | - repo: https://github.com/pre-commit/pre-commit-hooks |
18 | | - rev: v3.4.0 |
| 24 | + rev: v4.5.0 |
19 | 25 | hooks: |
20 | 26 | - id: check-yaml |
21 | 27 | - id: end-of-file-fixer |
22 | 28 | - id: trailing-whitespace |
23 | | - - repo: https://github.com/pycqa/isort |
24 | | - rev: 5.8.0 |
| 29 | + |
| 30 | + - repo: https://github.com/PyCQA/autoflake |
| 31 | + rev: v2.3.0 |
| 32 | + hooks: |
| 33 | + - id: autoflake |
| 34 | + args: |
| 35 | + - --in-place |
| 36 | + - --remove-unused-variables |
| 37 | + - --remove-all-unused-imports |
| 38 | + - --expand-star-imports |
| 39 | + - --ignore-init-module-imports |
| 40 | + |
| 41 | + - repo: https://github.com/pre-commit/mirrors-mypy |
| 42 | + rev: v1.8.0 |
25 | 43 | hooks: |
26 | | - - id: isort |
27 | | - name: isort (python) |
28 | | - args: [--profile=black] |
| 44 | + - id: mypy |
| 45 | + files: ^pymatgen/ |
| 46 | + args: |
| 47 | + - --namespace-packages |
| 48 | + - --explicit-package-bases |
| 49 | + additional_dependencies: ['types-requests'] |
0 commit comments