Skip to content

Commit

Permalink
style: Fix I202 Additional newline in a section of imports (#1136)
Browse files Browse the repository at this point in the history
* style: Fix I202 Additional newline in a section of imports

* style: Fix pep8 error in example app test module
  • Loading branch information
kgriffs authored and jmvrbanac committed Nov 10, 2017
1 parent d4a4818 commit 24d51a4
Show file tree
Hide file tree
Showing 10 changed files with 11 additions and 17 deletions.
1 change: 0 additions & 1 deletion examples/look/tests/test_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from falcon import testing
from mock import call, MagicMock, mock_open
import msgpack

import pytest

import look.app
Expand Down
2 changes: 1 addition & 1 deletion falcon/bench/dj/dj/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.conf.urls import url

from hello import views
from .hello import views

urlpatterns = [
url(r'^hello/(?P<account_id>[0-9]+)/test$', views.hello)
Expand Down
1 change: 0 additions & 1 deletion falcon/bench/queues/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# limitations under the License.

import falcon

from falcon.bench.queues import claims
from falcon.bench.queues import messages
from falcon.bench.queues import queues
Expand Down
1 change: 0 additions & 1 deletion falcon/cmd/print_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from __future__ import print_function

from functools import partial

import inspect

import falcon
Expand Down
1 change: 0 additions & 1 deletion falcon/media/handlers.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import mimeparse

from six.moves import UserDict

from falcon import errors
Expand Down
2 changes: 1 addition & 1 deletion falcon/request.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
import io
NativeStream = io.BufferedReader

from wsgiref.validate import InputWrapper
from wsgiref.validate import InputWrapper # NOQA: I202

import mimeparse
import six
Expand Down
2 changes: 1 addition & 1 deletion falcon/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# NOTE(tbug): In some cases, http_cookies is not a module
# but a dict-like structure. This fixes that issue.
# See issue https://github.com/falconry/falcon/issues/556
from six.moves import http_cookies
from six.moves import http_cookies # NOQA: I202

from falcon import DEFAULT_MEDIA_TYPE
from falcon.media import Handlers
Expand Down
5 changes: 5 additions & 0 deletions falcon/util/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@
"""

try:
import ujson as json # NOQA
except ImportError:
import json # NOQA

# Hoist misc. utils
from falcon.util import structures
from falcon.util.misc import * # NOQA
Expand Down
7 changes: 2 additions & 5 deletions tests/test_httperror.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
# -*- coding: utf-8

import datetime
try:
import ujson as json
except ImportError:
import json
import xml.etree.ElementTree as et
import xml.etree.ElementTree as et # noqa: I202

import pytest
import yaml

import falcon
import falcon.testing as testing
from falcon.util import json


@pytest.fixture
Expand Down
6 changes: 1 addition & 5 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@

from datetime import datetime
import functools
try:
import ujson as json
except ImportError:
import json
import random

import pytest
Expand All @@ -14,7 +10,7 @@
import falcon
from falcon import testing
from falcon import util
from falcon.util import uri
from falcon.util import json, uri


def _arbitrary_uris(count, length):
Expand Down

0 comments on commit 24d51a4

Please sign in to comment.