Skip to content

Commit 48152ec

Browse files
Updated .pre-commit-config and CONTRIBUTING.MD to latest Python version (#819)
1 parent 7cbec3a commit 48152ec

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

.pre-commit-config.yaml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# See https://pre-commit.com for more information
22
# See https://pre-commit.com/hooks.html for more hooks
3-
default_language_version:
4-
python: python3.12
53
repos:
64
- repo: https://github.com/pre-commit/pre-commit-hooks
75
rev: v6.0.0
@@ -20,8 +18,8 @@ repos:
2018
- id: ruff-format
2119

2220
ci:
23-
autofix_commit_msg: '[pre-commit.ci] auto fixes from pre-commit.com hooks'
24-
autofix_prs: true
25-
autoupdate_commit_msg: '[pre-commit.ci] pre-commit autoupdate'
26-
autoupdate_schedule: weekly
27-
submodules: false
21+
autofix_commit_msg: "[pre-commit.ci] auto fixes from pre-commit.com hooks"
22+
autofix_prs: true
23+
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
24+
autoupdate_schedule: weekly
25+
submodules: false

CONTRIBUTING.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,13 @@ pytest
7979
Run `bash ./scripts/stubtest.sh` to test that stubs and sources are in-line.
8080

8181
We have two special files to allow errors:
82+
8283
1. `scripts/stubtest/allowlist.txt` where we store things that we really don't care about: hacks, DRF internal utility modules, things that are handled by our plugin, things that are not representable by type system, etc
8384
2. `scripts/stubtest/allowlist_todo.txt` where we store all errors there are right now. Basically, this is a TODO list: we need to work through this list and fix things (or move entries to real `allowlist.txt`). In the end, ideally we can remove this file
8485

8586
You might also want to disable `incremental` mode while working on `stubtest` changes.
8687
This mode leads to several known problems (stubs do not show up or have strange errors).
8788

88-
**Important**: right now we only run `stubtest` on Python 3.12 (because it is the latest released version at the moment), any other versions might generate different outputs. Any work to create per-version allowlists is welcome.
89-
9089
## Submission Guidelines
9190

9291
The workflow for contributions is fairly simple:
@@ -97,7 +96,6 @@ The workflow for contributions is fairly simple:
9796
4. ensure your contribution does not introduce linting issues or breaks the tests by linting and testing the code.
9897
5. make a pull request with an adequate description.
9998

100-
10199
## Releasing `djangorestframework-stubs`
102100

103101
1. Open a pull request that updates `setup.py` (anyone can open this PR, not just maintainers):

0 commit comments

Comments
 (0)