File tree Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Expand file tree Collapse file tree 2 files changed +45
-0
lines changed Original file line number Diff line number Diff line change
1
+ default_language_version :
2
+ python : python3.9
3
+
4
+ repos :
5
+ - repo : https://github.com/pre-commit/pre-commit-hooks
6
+ rev : v4.5.0
7
+ hooks :
8
+ - id : check-yaml
9
+ - id : end-of-file-fixer
10
+ - id : trailing-whitespace
11
+ - repo : https://github.com/astral-sh/ruff-pre-commit
12
+ rev : v0.5.0
13
+ hooks :
14
+ # Run the linter.
15
+ - id : ruff
16
+ args : [ --fix ]
17
+ # Run the formatter.
18
+ - id : ruff-format
19
+ - repo : https://github.com/pre-commit/mirrors-mypy
20
+ rev : ' v1.10.1'
21
+ hooks :
22
+ - id : mypy
23
+ args : [ arcade, --explicit-package-bases ]
24
+ - repo : https://github.com/RobertCraigie/pyright-python
25
+ rev : v1.1.369
26
+ hooks :
27
+ - id : pyright
Original file line number Diff line number Diff line change @@ -95,6 +95,24 @@ the formatting is correct.
95
95
python make.py format
96
96
```
97
97
98
+ ### Use pre-commit hooks to automatically run formatting
99
+
100
+ You can use ` pre-commit <https://pre-commit.com/> ` _ to automatically run lint, formatting and type checks against
101
+ your changes before you commit them.
102
+ To install pre-commit, run the following command:
103
+
104
+ .. code-block:: shell
105
+
106
+ pip install pre-commit
107
+ # or on Mac
108
+ brew install pre-commit
109
+
110
+ Then, run the following command to install the pre-commit hooks:
111
+
112
+ .. code-block:: shell
113
+
114
+ pre-commit install
115
+
98
116
## Testing
99
117
100
118
You should test your changes locally before submitting a pull request
You can’t perform that action at this time.
0 commit comments