Skip to content

Commit cc39562

Browse files
committed
pre-commit autoupdate
1 parent 552a67a commit cc39562

File tree

5 files changed

+10
-14
lines changed

5 files changed

+10
-14
lines changed

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v3.4.0
3+
rev: v4.5.0
44
hooks:
55
- id: check-added-large-files
66
- id: check-case-conflict
@@ -9,17 +9,17 @@ repos:
99
- id: check-symlinks
1010
- id: check-toml
1111
- repo: https://github.com/pycqa/isort
12-
rev: 5.12.0
12+
rev: 5.13.2
1313
hooks:
1414
- id: isort
1515
- repo: https://github.com/PyCQA/flake8
16-
rev: 3.9.0
16+
rev: 7.0.0
1717
hooks:
1818
- id: flake8
1919
additional_dependencies:
2020
- flake8-tidy-imports
2121
- repo: https://github.com/adamchainz/blacken-docs
22-
rev: 1.13.0
22+
rev: 1.16.0
2323
hooks:
2424
- id: blacken-docs
2525
exclude: ^(?!docs).*$

docs/community/3.5-announcement.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,10 @@ from rest_framework.schemas import get_schema_view
6464
from rest_framework_swagger.renderers import OpenAPIRenderer, SwaggerUIRenderer
6565

6666
schema_view = get_schema_view(
67-
title='Example API',
68-
renderer_classes=[OpenAPIRenderer, SwaggerUIRenderer]
67+
title="Example API", renderer_classes=[OpenAPIRenderer, SwaggerUIRenderer]
6968
)
7069

71-
urlpatterns = [
72-
path('swagger/', schema_view),
73-
...
74-
]
70+
urlpatterns = [path("swagger/", schema_view), ...]
7571
```
7672

7773
There have been a large number of fixes to the schema generation. These should

docs/topics/browsable-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ To quickly add authentication to the browesable api, add a routes named `"login"
2121

2222
```python
2323
urlpatterns = [
24-
// ...
25-
url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
24+
# ...
25+
url(r"^api-auth/", include("rest_framework.urls", namespace="rest_framework"))
2626
]
2727
```
2828

rest_framework/decorators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def decorator(func):
3636
# WrappedAPIView.__doc__ = func.doc <--- Not possible to do this
3737

3838
# api_view applied without (method_names)
39-
assert not(isinstance(http_method_names, types.FunctionType)), \
39+
assert not isinstance(http_method_names, types.FunctionType), \
4040
'@api_view missing list of allowed HTTP methods'
4141

4242
# api_view applied with eg. string instead of list of strings

tests/test_throttling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ def ensure_response_header_contains_proper_throttle_field(self, view, expected_h
192192
if expect is not None:
193193
assert response['Retry-After'] == expect
194194
else:
195-
assert not'Retry-After' in response
195+
assert 'Retry-After' not in response
196196

197197
def test_seconds_fields(self):
198198
"""

0 commit comments

Comments
 (0)