This commit is contained in:
Bruno Alla 2025-10-21 14:28:02 +01:00 committed by GitHub
commit 1575c85c5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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.

View File

@ -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.
---

View File

@ -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]

View File

@ -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)