mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-07-27 00:19:53 +03:00
make github actions formatting happy.
This commit is contained in:
parent
dca1b5bc0e
commit
1f3caf5f71
|
@ -86,7 +86,6 @@ class ErrorDetail(str):
|
|||
def __repr__(self):
|
||||
return f"ErrorDetail(string='{str(self)}', code='{self.code}')"
|
||||
|
||||
|
||||
def __hash__(self):
|
||||
return hash(str(self))
|
||||
|
||||
|
|
|
@ -153,8 +153,7 @@ class Request:
|
|||
negotiator=None, parser_context=None):
|
||||
assert isinstance(request, HttpRequest), (
|
||||
'The `request` argument must be an instance of '
|
||||
'`django.http.HttpRequest`, not `{}.{}`.'
|
||||
.format(request.__class__.__module__, request.__class__.__name__)
|
||||
f'`django.http.HttpRequest`, not `{request.__class__.__module__}.{request.__class__.__name__}`.' # noqa
|
||||
)
|
||||
|
||||
self._request = request
|
||||
|
|
|
@ -70,9 +70,9 @@ class ErrorDetailTests(TestCase):
|
|||
|
||||
def test_repr(self):
|
||||
assert repr(ErrorDetail('msg1')) == \
|
||||
f"ErrorDetail(string='msg1', code='None')"
|
||||
"ErrorDetail(string='msg1', code='None')"
|
||||
assert repr(ErrorDetail('msg1', 'code')) == \
|
||||
f"ErrorDetail(string='msg1', code='code')"
|
||||
"ErrorDetail(string='msg1', code='code')"
|
||||
|
||||
def test_str(self):
|
||||
assert str(ErrorDetail('msg1')) == 'msg1'
|
||||
|
|
Loading…
Reference in New Issue
Block a user