File tree Expand file tree Collapse file tree 2 files changed +48
-6
lines changed Expand file tree Collapse file tree 2 files changed +48
-6
lines changed Original file line number Diff line number Diff line change
1
+ # pre-commit is a tool to perform a predefined set of tasks manually and/or
2
+ # automatically before git commits are made.
3
+ #
4
+ # Config reference: https://pre-commit.com/#pre-commit-configyaml---top-level
5
+ #
6
+ # Common tasks
7
+ #
8
+ # - Run on all files: pre-commit run --all-files
9
+ # - Register git hooks: pre-commit install --install-hooks
10
+ #
1
11
repos :
2
- - repo : https://github.com/google/go-jsonnet
3
- rev : v0.20.0
4
- hooks :
5
- - id : jsonnet-format
6
- # jsonnet-lint hook doesn't work
7
- # - id: jsonnet-lint
12
+ - repo : https://github.com/google/go-jsonnet
13
+ rev : v0.20.0
14
+ hooks :
15
+ - id : jsonnet-format
16
+ # jsonnet-lint hook doesn't work
17
+ # - id: jsonnet-lint
18
+
19
+ - repo : https://github.com/astral-sh/ruff-pre-commit
20
+ rev : v0.3.4
21
+ hooks :
22
+ - id : ruff-format
23
+ - id : ruff
24
+ args :
25
+ - --fix
26
+
27
+ # pre-commit.ci config reference: https://pre-commit.ci/#configuration
28
+ ci :
29
+ autoupdate_schedule : monthly
Original file line number Diff line number Diff line change
1
+ # ruff is used for autoformatting and linting Python code
2
+ #
3
+ # ref: https://docs.astral.sh/ruff/configuration/
4
+ #
5
+ [tool .ruff ]
6
+ target-version = " py38"
7
+
8
+ # ruff formatter ref: https://docs.astral.sh/ruff/formatter/
9
+ [tool .ruff .format ]
10
+ quote-style = " preserve"
11
+
12
+ # ruff linter ref: https://docs.astral.sh/ruff/linter/
13
+ [tool .ruff .lint ]
14
+ ignore = []
15
+ select = [
16
+ " E9" , # syntax
17
+ " I" , # isort
18
+ " UP" , # pyupgrade
19
+ " F" , # flake8
20
+ ]
You can’t perform that action at this time.
0 commit comments