Skip to content

Commit c782376

Browse files
authored
Merge pull request #5626 from rpkilby/update-reqs
Update test requirements
2 parents c63e35c + ddcb77b commit c782376

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

.isort.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@ skip=.tox
33
atomic=true
44
multi_line_output=5
55
known_standard_library=types
6-
known_third_party=pytest,django
6+
known_third_party=pytest,_pytest,django
77
known_first_party=rest_framework
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# PEP8 code linting, which we run on all commits.
2-
flake8==3.4.1
2+
flake8==3.5.0
33
flake8-tidy-imports==1.1.0
4-
pep8==1.7.0
4+
pycodestyle==2.3.1
55

66
# Sort and lint imports
7-
isort==4.2.5
7+
isort==4.2.15

requirements/requirements-optionals.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
pytz==2017.2
33
markdown==2.6.4
44
django-guardian==1.4.9
5-
django-filter==1.0.4
5+
django-filter==1.1.0
66
coreapi==2.3.1
77
coreschema==0.0.4

requirements/requirements-testing.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# PyTest for running the tests.
2-
pytest==3.2.2
2+
pytest==3.2.5
33
pytest-django==3.1.2
44
pytest-cov==2.5.1

rest_framework/schemas/inspectors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ def get_path_fields(self, path, method):
260260
# Attempt to infer a field description if possible.
261261
try:
262262
model_field = model._meta.get_field(variable)
263-
except:
263+
except Exception:
264264
model_field = None
265265

266266
if model_field is not None and model_field.verbose_name:

rest_framework/templatetags/rest_framework.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from django.utils.encoding import force_text, iri_to_uri
1111
from django.utils.html import escape, format_html, smart_urlquote
1212
from django.utils.safestring import SafeData, mark_safe
13+
1314
from rest_framework.compat import apply_markdown, pygments_highlight
1415
from rest_framework.renderers import HTMLFormRenderer
1516
from rest_framework.utils.urls import replace_query_param

rest_framework/utils/encoders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def default(self, obj):
6161
elif hasattr(obj, '__getitem__'):
6262
try:
6363
return dict(obj)
64-
except:
64+
except Exception:
6565
pass
6666
elif hasattr(obj, '__iter__'):
6767
return tuple(item for item in obj)

rest_framework/validators.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
# Robust filter and exist implementations. Ensures that queryset.exists() for
2020
# an invalid value returns `False`, rather than raising an error.
2121
# Refs https://github.com/encode/django-rest-framework/issues/3381
22-
2322
def qs_exists(queryset):
2423
try:
2524
return queryset.exists()

tests/importable/test_installed.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
from django.conf import settings
2+
23
from tests import importable
34

45

tests/test_description.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,9 @@
3333
}]
3434
```"""
3535

36+
3637
# If markdown is installed we also test it's working
3738
# (and that our wrapped forces '=' to h2 and '-' to h3)
38-
3939
MARKED_DOWN_HILITE = """
4040
<div class="highlight"><pre><span></span><span \
4141
class="p">[{</span><br /> <span class="nt">&quot;alpha&quot;</span><span\

tests/test_one_to_one_with_inheritance.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111

1212
# Regression test for #4290
13-
1413
class ChildAssociatedModel(RESTFrameworkModel):
1514
child_model = models.OneToOneField(ChildModel, on_delete=models.CASCADE)
1615
child_name = models.CharField(max_length=100)

0 commit comments

Comments
 (0)