Skip to content

Commit 4bc902d

Browse files
committed
update pre-commit hooks
1 parent 6257f3a commit 4bc902d

41 files changed

Lines changed: 157 additions & 106 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.pre-commit-config.yaml

Lines changed: 64 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,68 @@
11
repos:
2-
# Various general + format-specific helpers
3-
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.4.0
5-
hooks:
6-
- id: check-symlinks
7-
- id: trailing-whitespace
8-
- id: mixed-line-ending
9-
args: [--fix=lf]
10-
- id: check-yaml
11-
exclude: "mkdocs.yml"
12-
- id: check-toml
13-
- id: check-json
14-
- id: check-ast
15-
- id: debug-statements
16-
- id: check-merge-conflict
17-
- id: check-shebang-scripts-are-executable
18-
- id: check-added-large-files
19-
args: [--maxkb=10000]
20-
- repo: https://github.com/python-jsonschema/check-jsonschema
21-
rev: "0.22.0"
22-
hooks:
23-
- id: check-github-workflows
24-
- repo: https://github.com/astral-sh/ruff-pre-commit
25-
# Ruff version.
26-
rev: v0.1.6
27-
hooks:
28-
# Run the linter.
29-
- id: ruff
30-
types_or: [python, pyi, jupyter]
31-
args: [--fix]
32-
# Run the formatter.
33-
- id: ruff-format
34-
types_or: [python, pyi, jupyter]
35-
- repo: https://github.com/pre-commit/mirrors-mypy
36-
rev: "v1.1.1"
37-
hooks:
38-
- id: mypy
39-
args: [--no-strict-optional, --ignore-missing-imports]
40-
# NOTE: you might need to add some deps here:
41-
additional_dependencies: []
2+
# Various general + format-specific helpers
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v4.6.0
5+
hooks:
6+
- id: check-symlinks
7+
- id: trailing-whitespace
8+
- id: mixed-line-ending
9+
args: [--fix=lf]
10+
- id: check-yaml
11+
exclude: 'mkdocs.yml'
12+
- id: check-toml
13+
- id: check-json
14+
- id: check-ast
15+
- id: debug-statements
16+
- id: check-merge-conflict
17+
- id: check-shebang-scripts-are-executable
18+
- id: check-added-large-files
19+
args: [--maxkb=10000]
20+
- repo: https://github.com/python-jsonschema/check-jsonschema
21+
rev: '0.29.0'
22+
hooks:
23+
- id: check-github-workflows
24+
- repo: https://github.com/astral-sh/ruff-pre-commit
25+
# Ruff version.
26+
rev: v0.5.4
27+
hooks:
28+
# Run the linter.
29+
- id: ruff
30+
types_or: [python, pyi, jupyter]
31+
args: [--fix]
32+
# Run the formatter.
33+
- id: ruff-format
34+
types_or: [python, pyi, jupyter]
35+
- repo: https://github.com/pre-commit/mirrors-mypy
36+
rev: 'v1.11.0'
37+
hooks:
38+
- id: mypy
39+
args: [--no-strict-optional, --ignore-missing-imports]
40+
# NOTE: you might need to add some deps here:
41+
additional_dependencies: []
4242

43-
# Metadata
44-
- repo: https://github.com/citation-file-format/cff-converter-python
45-
rev: "44e8fc9"
46-
hooks:
47-
- id: validate-cff
48-
- repo: https://github.com/fsfe/reuse-tool
49-
rev: "v1.1.2"
50-
hooks:
51-
- id: reuse
43+
# Metadata
44+
- repo: https://github.com/citation-file-format/cff-converter-python
45+
rev: '054bda51dbe278b3e86f27c890e3f3ac877d616c'
46+
hooks:
47+
- id: validate-cff
48+
- repo: https://github.com/fsfe/reuse-tool
49+
rev: 'v4.0.3'
50+
hooks:
51+
- id: reuse
5252

53-
- repo: local
54-
hooks:
55-
# NOTE: copy from .pre-commit-hooks.yaml, for technical reasons
56-
- id: somesy-sync
57-
name: Run somesy sync
58-
entry: somesy sync
59-
language: python
60-
files: '^\.somesy\.toml|pyproject\.toml$'
61-
pass_filenames: false
53+
- repo: local
54+
hooks:
55+
# NOTE: copy from .pre-commit-hooks.yaml, for technical reasons
56+
- id: somesy-sync
57+
name: Run somesy sync
58+
entry: somesy sync
59+
language: python
60+
files: '^\.somesy\.toml|pyproject\.toml$'
61+
pass_filenames: false
6262

63-
- id: somesy-fill
64-
name: Update AUTHORS.md
65-
entry: somesy fill -t docs/_template_authors.md -o AUTHORS.md
66-
language: python
67-
files: '^\.somesy\.toml|pyproject\.toml$'
68-
pass_filenames: false
63+
- id: somesy-fill
64+
name: Update AUTHORS.md
65+
entry: somesy fill -t docs/_template_authors.md -o AUTHORS.md
66+
language: python
67+
files: '^\.somesy\.toml|pyproject\.toml$'
68+
pass_filenames: false

docs/scripts/coverage_status.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Mkdocs hook to run tests with coverage collection and generate a badge."""
2+
23
import logging
34
from io import StringIO
45
from pathlib import Path

src/somesy/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""somesy package."""
2+
23
import importlib_metadata
34
from typing_extensions import Final
45

src/somesy/cff/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""CFF module."""
2+
23
from .writer import CFF
34

45
__all__ = ["CFF"]

src/somesy/cff/writer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Citation File Format (CFF) parser and saver."""
2+
23
import json
34
from pathlib import Path
45
from typing import Optional

src/somesy/cli/fill.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Fill command of somesy."""
2+
23
import logging
34
from pathlib import Path
45
from sys import stdin

src/somesy/cli/init.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Set config files for somesy."""
2+
23
import logging
34
from pathlib import Path
45

src/somesy/cli/sync.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Sync command for somesy."""
2+
23
import logging
34
from pathlib import Path
45

src/somesy/cli/util.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Utility functions for CLI commands."""
2+
23
import logging
34
import traceback
45
from typing import Optional

src/somesy/codemeta/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
"""Integration with codemeta.json (to re-generate codemeta as part of somesy sync)."""
2+
23
from .writer import CodeMeta
34

45
__all__ = ["CodeMeta"]

0 commit comments

Comments
 (0)