Skip to content

Commit

Permalink
Code style
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelcaricio committed Apr 4, 2017
1 parent 36347c0 commit 363cb63
Show file tree
Hide file tree
Showing 20 changed files with 15 additions and 20 deletions.
3 changes: 1 addition & 2 deletions connexion/apis/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from .abstract import AbstractAPI

from .abstract import AbstractAPI # NOQA
2 changes: 1 addition & 1 deletion connexion/apis/abstract.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
import sys

import six

import yaml
from swagger_spec_validator.validator20 import validate_spec

import jinja2

from ..exceptions import ResolverError
from ..operation import Operation
from ..resolver import Resolver
Expand Down
4 changes: 2 additions & 2 deletions connexion/apis/flask_api.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import logging

import flask
import six
import werkzeug.exceptions

import flask
import werkzeug.exceptions
from connexion.apis import flask_utils
from connexion.apis.abstract import AbstractAPI
from connexion.decorators.produces import BaseSerializer, NoContent
Expand Down
1 change: 0 additions & 1 deletion connexion/apis/flask_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import re
import string


import flask
import werkzeug.wrappers

Expand Down
3 changes: 1 addition & 2 deletions connexion/apps/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
from .abstract import AbstractApp

from .abstract import AbstractApp # NOQA
1 change: 1 addition & 0 deletions connexion/apps/abstract.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import abc
import logging
import pathlib

import six

from ..resolver import Resolver
Expand Down
1 change: 0 additions & 1 deletion connexion/apps/flask_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
from ..resolver import Resolver
from .abstract import AbstractApp


logger = logging.getLogger('connexion.app')


Expand Down
1 change: 1 addition & 0 deletions connexion/decorators/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import six
from jsonschema import Draft4Validator, ValidationError, draft4_format_checker

from werkzeug import FileStorage

from ..exceptions import ExtraParameterProblem
Expand Down
1 change: 0 additions & 1 deletion connexion/request.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from collections import namedtuple


_ConnexionRequest = namedtuple('SwaggerRequest', [
'url', 'method', 'path_params', 'query', 'headers',
'form', 'body', 'json', 'files', 'context'
Expand Down
1 change: 0 additions & 1 deletion connexion/response.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
from collections import namedtuple


_ConnexionResponse = namedtuple('SwaggerRequest', [
'mimetype', 'content_type', 'status_code', 'body', 'headers'
])
Expand Down
1 change: 1 addition & 0 deletions examples/basicauth/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
'''

import connexion

import flask

try:
Expand Down
1 change: 1 addition & 0 deletions examples/oauth2/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
'''

import connexion

import flask


Expand Down
1 change: 1 addition & 0 deletions tests/api/test_errors.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import json

import flask


Expand Down
1 change: 1 addition & 0 deletions tests/api/test_parameters.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
from io import BytesIO


def test_parameter_validation(simple_app):
app_client = simple_app.app.test_client()

Expand Down
3 changes: 1 addition & 2 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
import pathlib

import pytest
from connexion import FlaskApi
from connexion import FlaskApp
from connexion import FlaskApi, FlaskApp

logging.basicConfig(level=logging.DEBUG)

Expand Down
2 changes: 1 addition & 1 deletion tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from yaml import YAMLError

import pytest
from connexion.apis.abstract import canonical_base_url
from connexion import FlaskApi
from connexion.apis.abstract import canonical_base_url
from connexion.exceptions import InvalidSpecification, ResolverError

TEST_FOLDER = pathlib.Path(__file__).parent
Expand Down
1 change: 0 additions & 1 deletion tests/test_flask_encoder.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import datetime
import json
import math

from decimal import Decimal

from connexion.apps.flask_app import FlaskJSONEncoder
Expand Down
1 change: 0 additions & 1 deletion tests/test_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import mock
import pytest

from connexion.apis.flask_api import Jsonifier
from connexion.decorators.security import security_passthrough, verify_oauth
from connexion.exceptions import InvalidSpecification
Expand Down
3 changes: 1 addition & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import math

import connexion.apps
from connexion import utils
import pytest

from connexion import utils
from mock import MagicMock


Expand Down
3 changes: 1 addition & 2 deletions tests/test_validation.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import json
import flask

import flask
from connexion.apis.flask_api import FlaskApi
from connexion.decorators.validation import ParameterValidator
# we are using "mock" module here for Py 2.7 support
from mock import MagicMock



def test_parameter_validator(monkeypatch):
request = MagicMock(name='request')
request.args = {}
Expand Down

0 comments on commit 363cb63

Please sign in to comment.