Skip to content

Commit f93e614

Browse files
authored
fix:add pre-commit (#316)
1 parent 1286fe5 commit f93e614

28 files changed

+228
-114
lines changed

.github/CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,11 +115,11 @@ following steps in advance to help us fix any potential bug as fast as possible.
115115
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
116116

117117
- Open an [Issue](https://github.com/django-commons/django-tasks-scheduler/issues/new).
118-
(Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and
118+
(Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and
119119
not to label the issue.)
120120
- Explain the behavior you would expect and the actual behavior.
121121
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to
122-
recreate the issue on their own. This usually includes your code.
122+
recreate the issue on their own. This usually includes your code.
123123
For good bug reports, you should isolate the problem and create a reduced test case.
124124
- Provide the information you collected in the previous section.
125125

@@ -228,7 +228,7 @@ contextual information and is contained within parenthesis, e.g., feat(parser):
228228

229229
## Join The Project Team
230230

231-
If you wish to be added to the project team as a collaborator, please create an issue
231+
If you wish to be added to the project team as a collaborator, please create an issue
232232
explaining why you wish to join the team and tag @cunla in the issue.
233233

234234
<!-- omit in toc -->

.github/dependabot.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
version: 2
77
updates:
8-
- package-ecosystem: "pip"
8+
- package-ecosystem: "pip"
99
directory: "/"
1010
schedule:
1111
interval: "daily"

.github/release-drafter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ version-resolver:
2828
template: |
2929
## Changes
3030
31-
$CHANGES
31+
$CHANGES

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,4 @@ jobs:
7878
uses: pypa/[email protected]
7979
with:
8080
repository-url: https://test.pypi.org/legacy/
81-
skip-existing: true
81+
skip-existing: true

.github/workflows/test-workflow.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,4 @@ jobs:
4343
echo "reason: ${{ github.event.inputs.reason }}"
4444
echo "environment-optional: ${{ github.event.inputs.environment-optional }}"
4545
echo "choices-input-optional: ${{ github.event.inputs.choices-input-optional }}"
46-
echo "number-input-optional: ${{ github.event.inputs.number-input-optional }}"
46+
echo "number-input-optional: ${{ github.event.inputs.number-input-optional }}"

.github/zizmor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,4 @@ rules:
1212
github-env:
1313
ignore:
1414
- 'action.yml:36:7'
15-
- 'action.yml:28:7'
15+
- 'action.yml:28:7'

.pre-commit-config.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v6.0.0
4+
hooks:
5+
- id: check-yaml
6+
- id: check-json
7+
- id: check-xml
8+
- id: end-of-file-fixer
9+
- id: trailing-whitespace
10+
- repo: https://github.com/astral-sh/ruff-pre-commit
11+
rev: v0.14.0
12+
hooks:
13+
- id: ruff-check
14+
args: [--fix]
15+
- id: ruff-format

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ from typing import Dict
2222
from scheduler.types import SchedulerConfiguration, Broker, QueueConfiguration
2323

2424
INSTALLED_APPS = [
25-
# ...
25+
# ...
2626
'scheduler',
2727
# ...
2828
]
@@ -67,6 +67,13 @@ python manage.py migrate
6767
4. Check out the admin views:
6868
![](./docs/media/admin-tasks-list.jpg)
6969

70+
71+
# Local development environment
72+
73+
You can install [`pre-commit` hook](https://pre-commit.com/) in the repo to add it as a git hook by
74+
running: `pre-commit install`. It is configured to check all change files based on configuration in
75+
`.pre-commit-config.yaml`.
76+
7077
# Sponsor
7178

7279
django-tasks-scheduler is developed for free.

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@
1010

1111
To report a security vulnerability, please use the
1212
[Tidelift security contact](https://tidelift.com/security).
13-
Tidelift will coordinate the fix and disclosure.
13+
Tidelift will coordinate the fix and disclosure.

docs/changelog.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,4 +300,4 @@ Settings:
300300
### 🐛 Bug Fixes
301301
302302
### 🧰 Maintenance
303-
-->
303+
-->

0 commit comments

Comments
 (0)