File tree 4 files changed +22
-2
lines changed
4 files changed +22
-2
lines changed Original file line number Diff line number Diff line change
1
+ repos :
2
+ - repo : local
3
+ hooks :
4
+ - id : lint
5
+ name : Lint
6
+ entry : just lint
7
+ language : system
8
+ pass_filenames : false
9
+ - id : format
10
+ name : Format
11
+ entry : just format
12
+ language : system
13
+ pass_filenames : false
Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ Change Log
7
7
v3.0.0 (202X-XX-XX)
8
8
===================
9
9
10
+ * Implemented `Add precommit hook to fix safe lint and format issues <https://github.com/django-commons/django-typer/issues/153 >`_
10
11
* BREAKING `Remove name parameter from initialize()/callback(). <https://github.com/django-commons/django-typer/issues/150 >`_
11
12
* Implemented `Run full test suite on mac osx <https://github.com/django-commons/django-typer/issues/148 >`_
12
13
* Implemented `Convert check.sh to justfile <https://github.com/django-commons/django-typer/issues/147 >`_
Original file line number Diff line number Diff line change @@ -12,10 +12,14 @@ init:
12
12
poetry config --local virtualenvs.in-project true
13
13
poetry run pip install --upgrade pip setuptools wheel
14
14
15
+ install-precommit :
16
+ poetry run pre-commit install
17
+
15
18
install * PACKAGES = " Django":
16
19
poetry env use python
17
20
poetry lock
18
21
poetry install -E rich
22
+ poetry run pre-commit install
19
23
poetry run pip install -U {{ PACKAGES }}
20
24
21
25
install-colorama :
@@ -95,7 +99,7 @@ sort-imports:
95
99
lint : sort-imports
96
100
poetry run ruff check --fix
97
101
98
- fix : format lint
102
+ fix : lint format
99
103
100
104
check : check-lint check-format check-types check-package check-docs check-docs-links check-readme
101
105
@@ -115,7 +119,8 @@ test: test-rich test-no-rich install-colorama
115
119
test-cases + TESTS :
116
120
poetry run pytest {{ TESTS }}
117
121
118
- precommit : fix
122
+ precommit :
123
+ poetry run pre-commit
119
124
120
125
coverage :
121
126
poetry run coverage combine --keep *.coverage
Original file line number Diff line number Diff line change @@ -95,6 +95,7 @@ graphviz = ">=0.20.3"
95
95
pluggy = " >=1.5.0"
96
96
pywinpty = { version = " >=2.0.14" , markers = " sys_platform == 'win32'" }
97
97
pytest-timeout = " >=2.3.1"
98
+ pre-commit = " >=4.0.1"
98
99
99
100
[tool .poetry .extras ]
100
101
rich = [" rich" ]
You can’t perform that action at this time.
0 commit comments