From 282120ba44578267e627dbe76a7ac86d2967b093 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 14 Oct 2025 08:22:20 +0200 Subject: [PATCH 1/3] Auto-update pre-commit hooks --- .pre-commit-config.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 130793f80..28686275a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.5.0 + rev: v6.0.0 hooks: - id: check-added-large-files - id: check-case-conflict @@ -8,12 +8,12 @@ repos: - id: check-merge-conflict - id: check-symlinks - id: check-toml -- repo: https://github.com/pycqa/isort - rev: 5.13.2 +- repo: https://github.com/PyCQA/isort + rev: 7.0.0 hooks: - id: isort - repo: https://github.com/PyCQA/flake8 - rev: 7.0.0 + rev: 7.3.0 hooks: - id: flake8 additional_dependencies: @@ -26,7 +26,7 @@ repos: - black==25.9.0 - repo: https://github.com/codespell-project/codespell # Configuration for codespell is in .codespellrc - rev: v2.2.6 + rev: v2.4.1 hooks: - id: codespell exclude: locale|kickstarter-announcement.md|coreapi-0.1.1.js @@ -39,6 +39,6 @@ repos: - id: pyupgrade args: ["--py310-plus", "--keep-percent-format"] - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.6.0 + rev: v2.11.0 hooks: - id: pyproject-fmt From ae5dc5f0706ac47c486075faf46a606ca1a1f916 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 14 Oct 2025 08:24:41 +0200 Subject: [PATCH 2/3] Supress new flake8 error --- tests/test_lazy_hyperlinks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_lazy_hyperlinks.py b/tests/test_lazy_hyperlinks.py index 716d02d2a..db1de3567 100644 --- a/tests/test_lazy_hyperlinks.py +++ b/tests/test_lazy_hyperlinks.py @@ -39,7 +39,7 @@ class TestLazyHyperlinkNames(TestCase): self.example = Example.objects.create(text='foo') def test_lazy_hyperlink_names(self): - global str_called + global str_called # noqa: F824 context = {'request': None} serializer = ExampleSerializer(self.example, context=context) JSONRenderer().render(serializer.data) From 32f8d1bdde87fbde0a248617b5bad973d4bc2149 Mon Sep 17 00:00:00 2001 From: Bruno Alla Date: Tue, 14 Oct 2025 08:29:20 +0200 Subject: [PATCH 3/3] Fix codespell --- docs/api-guide/metadata.md | 2 +- docs/api-guide/testing.md | 2 +- docs/api-guide/validators.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/api-guide/metadata.md b/docs/api-guide/metadata.md index 20708c6e3..f4e8ed2da 100644 --- a/docs/api-guide/metadata.md +++ b/docs/api-guide/metadata.md @@ -66,7 +66,7 @@ The REST framework package only includes a single metadata class implementation, ## Creating schema endpoints -If you have specific requirements for creating schema endpoints that are accessed with regular `GET` requests, you might consider re-using the metadata API for doing so. +If you have specific requirements for creating schema endpoints that are accessed with regular `GET` requests, you might consider reusing the metadata API for doing so. For example, the following additional route could be used on a viewset to provide a linkable schema endpoint. diff --git a/docs/api-guide/testing.md b/docs/api-guide/testing.md index 97b432ddd..a84379eef 100644 --- a/docs/api-guide/testing.md +++ b/docs/api-guide/testing.md @@ -92,7 +92,7 @@ For example, when forcibly authenticating using a token, you might do something --- -**Note**: `force_authenticate` directly sets `request.user` to the in-memory `user` instance. If you are re-using the same `user` instance across multiple tests that update the saved `user` state, you may need to call [`refresh_from_db()`][refresh_from_db_docs] between tests. +**Note**: `force_authenticate` directly sets `request.user` to the in-memory `user` instance. If you are reusing the same `user` instance across multiple tests that update the saved `user` state, you may need to call [`refresh_from_db()`][refresh_from_db_docs] between tests. --- diff --git a/docs/api-guide/validators.md b/docs/api-guide/validators.md index e3407e8a3..3a122a3c6 100644 --- a/docs/api-guide/validators.md +++ b/docs/api-guide/validators.md @@ -5,7 +5,7 @@ source: # Validators -> Validators can be useful for re-using validation logic between different types of fields. +> Validators can be useful for reusing validation logic between different types of fields. > > — [Django documentation][cite]