Bump flake8 to 3.8.3 (#7521)

This commit is contained in:
David Smith 2020-09-05 09:02:27 +01:00 committed by GitHub
parent 35c0abf24e
commit d5461e93fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 5 additions and 6 deletions

View File

@ -1,7 +1,7 @@
# PEP8 code linting, which we run on all commits. # PEP8 code linting, which we run on all commits.
flake8==3.7.9 flake8==3.8.3
flake8-tidy-imports==4.1.0 flake8-tidy-imports==4.1.0
pycodestyle==2.5.0 pycodestyle==2.6.0
# Sort and lint imports # Sort and lint imports
isort==5.4.2 isort==5.4.2

View File

@ -856,8 +856,8 @@ class DocumentationRenderer(BaseRenderer):
return { return {
'document': data, 'document': data,
'langs': self.languages, 'langs': self.languages,
'lang_htmls': ["rest_framework/docs/langs/%s.html" % l for l in self.languages], 'lang_htmls': ["rest_framework/docs/langs/%s.html" % language for language in self.languages],
'lang_intro_htmls': ["rest_framework/docs/langs/%s-intro.html" % l for l in self.languages], 'lang_intro_htmls': ["rest_framework/docs/langs/%s-intro.html" % language for language in self.languages],
'code_style': pygments_css(self.code_style), 'code_style': pygments_css(self.code_style),
'request': request 'request': request
} }

View File

@ -58,7 +58,6 @@ def get_detail_view_name(model):
that refer to instances of the model. that refer to instances of the model.
""" """
return '%(model_name)s-detail' % { return '%(model_name)s-detail' % {
'app_label': model._meta.app_label,
'model_name': model._meta.object_name.lower() 'model_name': model._meta.object_name.lower()
} }

View File

@ -669,7 +669,7 @@ class TestBooleanField(FieldValues):
for input_value in inputs: for input_value in inputs:
with pytest.raises(serializers.ValidationError) as exc_info: with pytest.raises(serializers.ValidationError) as exc_info:
field.run_validation(input_value) field.run_validation(input_value)
expected = ['Must be a valid boolean.'.format(input_value)] expected = ['Must be a valid boolean.']
assert exc_info.value.detail == expected assert exc_info.value.detail == expected