From 3cbb515787ff8d83996627b05d94be359707f7da Mon Sep 17 00:00:00 2001
From: "p.kamayev"
Date: Thu, 28 Apr 2016 11:20:34 +0300
Subject: [PATCH] linting
---
.isort.cfg | 2 +-
rest_framework/fields.py | 4 +++-
rest_framework/relations.py | 4 +---
tests/compat/compat_py35.py | 4 ++++
tests/test_compat.py | 1 -
5 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/.isort.cfg b/.isort.cfg
index 4d4a6a509..6a749cf25 100644
--- a/.isort.cfg
+++ b/.isort.cfg
@@ -1,5 +1,5 @@
[settings]
-skip=.tox
+skip=.tox,tests/compat/compat_py35.py
atomic=true
multi_line_output=5
known_standard_library=types
diff --git a/rest_framework/fields.py b/rest_framework/fields.py
index 0e79cf918..e7535bfe3 100644
--- a/rest_framework/fields.py
+++ b/rest_framework/fields.py
@@ -30,7 +30,9 @@ from django.utils.ipv6 import clean_ipv6_address
from django.utils.translation import ugettext_lazy as _
from rest_framework import ISO_8601
-from rest_framework.compat import unicode_repr, unicode_to_repr, is_simple_callable
+from rest_framework.compat import (
+ is_simple_callable, unicode_repr, unicode_to_repr
+)
from rest_framework.exceptions import ValidationError
from rest_framework.settings import api_settings
from rest_framework.utils import html, humanize_datetime, representation
diff --git a/rest_framework/relations.py b/rest_framework/relations.py
index 554a8c943..5d8a41ad8 100644
--- a/rest_framework/relations.py
+++ b/rest_framework/relations.py
@@ -15,9 +15,7 @@ from django.utils.six.moves.urllib import parse as urlparse
from django.utils.translation import ugettext_lazy as _
from rest_framework.compat import is_simple_callable
-from rest_framework.fields import (
- Field, empty, get_attribute, iter_options
-)
+from rest_framework.fields import Field, empty, get_attribute, iter_options
from rest_framework.reverse import reverse
from rest_framework.utils import html
diff --git a/tests/compat/compat_py35.py b/tests/compat/compat_py35.py
index 19b849b0c..8265f2658 100644
--- a/tests/compat/compat_py35.py
+++ b/tests/compat/compat_py35.py
@@ -1,3 +1,7 @@
+# for now, linting is done by python2.7, so for that file it should be disabled.
+# flake8: noqa
+
+
class FunctionSimplicityCheckPy35Mixin:
def get_good_cases(self):
def annotated_simple() -> int:
diff --git a/tests/test_compat.py b/tests/test_compat.py
index a93ccd398..974b9ba25 100644
--- a/tests/test_compat.py
+++ b/tests/test_compat.py
@@ -1,6 +1,5 @@
from __future__ import unicode_literals
-import pytest
import sys
from rest_framework.compat import is_simple_callable