mirror of
https://github.com/LukeHagar/connexion.git
synced 2025-12-09 20:37:46 +00:00
bump and pin isort, apply all automatic fixes (#903)
Fixes the build. Changes proposed in this pull request: - apply all of the isort changes that resulted from the latest version - pin to the latest version (4.3.15) so this doesn't happen again, unless we bump the version on purpose
This commit is contained in:
committed by
João Santos
parent
0989a93df5
commit
08e4536e5e
@@ -1,15 +1,16 @@
|
|||||||
import werkzeug.exceptions as exceptions # NOQA
|
|
||||||
from .apps import AbstractApp # NOQA
|
|
||||||
from .apis import AbstractAPI # NOQA
|
|
||||||
from .exceptions import ProblemException # NOQA
|
|
||||||
from .problem import problem # NOQA
|
|
||||||
from .decorators.produces import NoContent # NOQA
|
|
||||||
from .resolver import Resolution, Resolver, RestyResolver # NOQA
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
import werkzeug.exceptions as exceptions # NOQA
|
||||||
|
|
||||||
|
from .apis import AbstractAPI # NOQA
|
||||||
|
from .apps import AbstractApp # NOQA
|
||||||
|
from .decorators.produces import NoContent # NOQA
|
||||||
|
from .exceptions import ProblemException # NOQA
|
||||||
# add operation for backwards compatability
|
# add operation for backwards compatability
|
||||||
from .operations import compat
|
from .operations import compat
|
||||||
|
from .problem import problem # NOQA
|
||||||
|
from .resolver import Resolution, Resolver, RestyResolver # NOQA
|
||||||
|
|
||||||
full_name = '{}.operation'.format(__package__)
|
full_name = '{}.operation'.format(__package__)
|
||||||
sys.modules[full_name] = sys.modules[compat.__name__]
|
sys.modules[full_name] = sys.modules[compat.__name__]
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ import logging
|
|||||||
import re
|
import re
|
||||||
from urllib.parse import parse_qs
|
from urllib.parse import parse_qs
|
||||||
|
|
||||||
import jinja2
|
|
||||||
|
|
||||||
import aiohttp_jinja2
|
import aiohttp_jinja2
|
||||||
|
import jinja2
|
||||||
from aiohttp import web
|
from aiohttp import web
|
||||||
from aiohttp.web_exceptions import HTTPNotFound
|
from aiohttp.web_exceptions import HTTPNotFound
|
||||||
from connexion.apis.abstract import AbstractAPI
|
from connexion.apis.abstract import AbstractAPI
|
||||||
|
|||||||
@@ -3,14 +3,13 @@ import logging
|
|||||||
import flask
|
import flask
|
||||||
import six
|
import six
|
||||||
import werkzeug.exceptions
|
import werkzeug.exceptions
|
||||||
from werkzeug.local import LocalProxy
|
|
||||||
|
|
||||||
from connexion.apis import flask_utils
|
from connexion.apis import flask_utils
|
||||||
from connexion.apis.abstract import AbstractAPI
|
from connexion.apis.abstract import AbstractAPI
|
||||||
from connexion.decorators.produces import NoContent
|
from connexion.decorators.produces import NoContent
|
||||||
from connexion.handlers import AuthErrorHandler
|
from connexion.handlers import AuthErrorHandler
|
||||||
from connexion.lifecycle import ConnexionRequest, ConnexionResponse
|
from connexion.lifecycle import ConnexionRequest, ConnexionResponse
|
||||||
from connexion.utils import Jsonifier, is_json_mimetype, yamldumper
|
from connexion.utils import Jsonifier, is_json_mimetype, yamldumper
|
||||||
|
from werkzeug.local import LocalProxy
|
||||||
|
|
||||||
logger = logging.getLogger('connexion.apis.flask_api')
|
logger = logging.getLogger('connexion.apis.flask_api')
|
||||||
|
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ import sys
|
|||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
import click
|
import click
|
||||||
from clickclick import AliasedGroup, fatal_error
|
|
||||||
|
|
||||||
import connexion
|
import connexion
|
||||||
|
from clickclick import AliasedGroup, fatal_error
|
||||||
from connexion.mock import MockResolver
|
from connexion.mock import MockResolver
|
||||||
|
|
||||||
logger = logging.getLogger('connexion.cli')
|
logger = logging.getLogger('connexion.cli')
|
||||||
|
|||||||
@@ -6,9 +6,8 @@ import os
|
|||||||
import textwrap
|
import textwrap
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
from six.moves import http_cookies
|
|
||||||
|
|
||||||
from connexion.utils import get_function_from_name
|
from connexion.utils import get_function_from_name
|
||||||
|
from six.moves import http_cookies
|
||||||
|
|
||||||
from ..exceptions import (ConnexionException, OAuthProblem,
|
from ..exceptions import (ConnexionException, OAuthProblem,
|
||||||
OAuthResponseProblem, OAuthScopeProblem)
|
OAuthResponseProblem, OAuthScopeProblem)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
from .abstract import AbstractOperation # noqa
|
from .abstract import AbstractOperation # noqa
|
||||||
from .openapi import OpenAPIOperation # noqa
|
from .openapi import OpenAPIOperation # noqa
|
||||||
from .swagger2 import Swagger2Operation # noqa
|
|
||||||
from .secure import SecureOperation # noqa
|
from .secure import SecureOperation # noqa
|
||||||
|
from .swagger2 import Swagger2Operation # noqa
|
||||||
|
|
||||||
|
|
||||||
def make_operation(spec, *args, **kwargs):
|
def make_operation(spec, *args, **kwargs):
|
||||||
|
|||||||
@@ -2,7 +2,6 @@ import abc
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
import six
|
import six
|
||||||
|
|
||||||
from connexion.operations.secure import SecureOperation
|
from connexion.operations.secure import SecureOperation
|
||||||
|
|
||||||
from ..decorators.metrics import UWSGIMetricsCollector
|
from ..decorators.metrics import UWSGIMetricsCollector
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import asyncio
|
|||||||
import base64
|
import base64
|
||||||
|
|
||||||
import ujson
|
import ujson
|
||||||
|
|
||||||
from conftest import TEST_FOLDER
|
from conftest import TEST_FOLDER
|
||||||
from connexion import AioHttpApp
|
from connexion import AioHttpApp
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import logging
|
|||||||
from unittest import mock
|
from unittest import mock
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from conftest import TEST_FOLDER
|
from conftest import TEST_FOLDER
|
||||||
from connexion import AioHttpApp
|
from connexion import AioHttpApp
|
||||||
from connexion.exceptions import ConnexionException
|
from connexion.exceptions import ConnexionException
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
import pytest
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
import aiohttp.web
|
import aiohttp.web
|
||||||
import pytest
|
|
||||||
from conftest import TEST_FOLDER
|
from conftest import TEST_FOLDER
|
||||||
from connexion import AioHttpApp
|
from connexion import AioHttpApp
|
||||||
|
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
import jinja2
|
import jinja2
|
||||||
|
import mock
|
||||||
|
import pytest
|
||||||
import yaml
|
import yaml
|
||||||
from openapi_spec_validator.loaders import ExtendedSafeLoader
|
from openapi_spec_validator.loaders import ExtendedSafeLoader
|
||||||
|
|
||||||
import mock
|
|
||||||
import pytest
|
|
||||||
from conftest import TEST_FOLDER, build_app_from_fixture
|
from conftest import TEST_FOLDER, build_app_from_fixture
|
||||||
from connexion import App
|
from connexion import App
|
||||||
from connexion.exceptions import InvalidSpecification
|
from connexion.exceptions import InvalidSpecification
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import pathlib
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from connexion import App
|
from connexion import App
|
||||||
|
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
from connexion.decorators.parameter import parameter_to_arg
|
|
||||||
# we are using "mock" module here for Py 2.7 support
|
# we are using "mock" module here for Py 2.7 support
|
||||||
from mock import MagicMock
|
from mock import MagicMock
|
||||||
|
|
||||||
|
from connexion.decorators.parameter import parameter_to_arg
|
||||||
|
|
||||||
|
|
||||||
def test_injection():
|
def test_injection():
|
||||||
request = MagicMock(name='request', path_params={'p1': '123'})
|
request = MagicMock(name='request', path_params={'p1': '123'})
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
import requests
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
import requests
|
||||||
|
from mock import MagicMock
|
||||||
|
|
||||||
from connexion.decorators.security import (get_tokeninfo_func,
|
from connexion.decorators.security import (get_tokeninfo_func,
|
||||||
get_tokeninfo_remote,
|
get_tokeninfo_remote,
|
||||||
validate_scope, verify_apikey,
|
validate_scope, verify_apikey,
|
||||||
verify_basic, verify_oauth)
|
verify_basic, verify_oauth)
|
||||||
from connexion.exceptions import (OAuthProblem, OAuthResponseProblem,
|
from connexion.exceptions import (OAuthProblem, OAuthResponseProblem,
|
||||||
OAuthScopeProblem)
|
OAuthScopeProblem)
|
||||||
from mock import MagicMock
|
|
||||||
|
|
||||||
|
|
||||||
def test_get_tokeninfo_url(monkeypatch):
|
def test_get_tokeninfo_url(monkeypatch):
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
import pytest
|
||||||
from werkzeug.datastructures import MultiDict
|
from werkzeug.datastructures import MultiDict
|
||||||
|
|
||||||
import pytest
|
|
||||||
from connexion.decorators.uri_parsing import (AlwaysMultiURIParser,
|
from connexion.decorators.uri_parsing import (AlwaysMultiURIParser,
|
||||||
FirstValueURIParser,
|
FirstValueURIParser,
|
||||||
Swagger2URIParser)
|
Swagger2URIParser)
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
from jsonschema import ValidationError
|
|
||||||
|
|
||||||
import pytest
|
import pytest
|
||||||
|
from jsonschema import ValidationError
|
||||||
|
from mock import MagicMock
|
||||||
|
|
||||||
from connexion.decorators.validation import ParameterValidator
|
from connexion.decorators.validation import ParameterValidator
|
||||||
from connexion.json_schema import (Draft4RequestValidator,
|
from connexion.json_schema import (Draft4RequestValidator,
|
||||||
Draft4ResponseValidator)
|
Draft4ResponseValidator)
|
||||||
from mock import MagicMock
|
|
||||||
|
|
||||||
|
|
||||||
def test_get_valid_parameter():
|
def test_get_valid_parameter():
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
from .example_method_view import Example_methodView
|
from .example_method_view import Example_methodView
|
||||||
|
|
||||||
|
|
||||||
def get():
|
def get():
|
||||||
return ''
|
return ''
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
import pathlib
|
import pathlib
|
||||||
import tempfile
|
import tempfile
|
||||||
|
|
||||||
|
import pytest
|
||||||
|
from mock import MagicMock
|
||||||
from yaml import YAMLError
|
from yaml import YAMLError
|
||||||
|
|
||||||
import pytest
|
|
||||||
from connexion import FlaskApi
|
from connexion import FlaskApi
|
||||||
from connexion.exceptions import InvalidSpecification, ResolverError
|
from connexion.exceptions import InvalidSpecification, ResolverError
|
||||||
from connexion.spec import canonical_base_path
|
from connexion.spec import canonical_base_path
|
||||||
from mock import MagicMock
|
|
||||||
|
|
||||||
TEST_FOLDER = pathlib.Path(__file__).parent
|
TEST_FOLDER = pathlib.Path(__file__).parent
|
||||||
|
|
||||||
|
|||||||
@@ -1,14 +1,14 @@
|
|||||||
import logging
|
import logging
|
||||||
|
|
||||||
|
import pytest
|
||||||
from click.testing import CliRunner
|
from click.testing import CliRunner
|
||||||
|
from mock import MagicMock
|
||||||
|
from mock import call as mock_call
|
||||||
|
|
||||||
import connexion
|
import connexion
|
||||||
import pytest
|
|
||||||
from conftest import FIXTURES_FOLDER
|
from conftest import FIXTURES_FOLDER
|
||||||
from connexion.cli import main
|
from connexion.cli import main
|
||||||
from connexion.exceptions import ResolverError
|
from connexion.exceptions import ResolverError
|
||||||
from mock import MagicMock
|
|
||||||
from mock import call as mock_call
|
|
||||||
|
|
||||||
|
|
||||||
@pytest.fixture()
|
@pytest.fixture()
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
|
import pytest
|
||||||
from jsonschema.validators import _utils, extend
|
from jsonschema.validators import _utils, extend
|
||||||
|
|
||||||
import pytest
|
|
||||||
from conftest import build_app_from_fixture
|
from conftest import build_app_from_fixture
|
||||||
from connexion import App
|
from connexion import App
|
||||||
from connexion.decorators.validation import RequestBodyValidator
|
from connexion.decorators.validation import RequestBodyValidator
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
import flask
|
import flask
|
||||||
|
from mock import MagicMock
|
||||||
|
|
||||||
import connexion
|
import connexion
|
||||||
from connexion.decorators.metrics import UWSGIMetricsCollector
|
from connexion.decorators.metrics import UWSGIMetricsCollector
|
||||||
from mock import MagicMock
|
|
||||||
|
|
||||||
|
|
||||||
def test_timer(monkeypatch):
|
def test_timer(monkeypatch):
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import types
|
|||||||
|
|
||||||
import mock
|
import mock
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from connexion.apis.flask_api import Jsonifier
|
from connexion.apis.flask_api import Jsonifier
|
||||||
from connexion.decorators.security import (get_tokeninfo_remote,
|
from connexion.decorators.security import (get_tokeninfo_remote,
|
||||||
validate_scope, verify_security)
|
validate_scope, verify_security)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import mock
|
import mock
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
from connexion.apis.flask_api import Jsonifier
|
from connexion.apis.flask_api import Jsonifier
|
||||||
from connexion.json_schema import RefResolutionError, resolve_refs
|
from connexion.json_schema import RefResolutionError, resolve_refs
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import connexion.apps
|
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
import connexion.apps
|
||||||
from connexion.exceptions import ResolverError
|
from connexion.exceptions import ResolverError
|
||||||
from connexion.operations import Swagger2Operation
|
from connexion.operations import Swagger2Operation
|
||||||
from connexion.resolver import Resolver, RestyResolver
|
from connexion.resolver import Resolver, RestyResolver
|
||||||
|
|||||||
@@ -1,10 +1,11 @@
|
|||||||
import math
|
import math
|
||||||
|
|
||||||
import connexion.apps
|
|
||||||
import pytest
|
import pytest
|
||||||
from connexion import utils
|
|
||||||
from mock import MagicMock
|
from mock import MagicMock
|
||||||
|
|
||||||
|
import connexion.apps
|
||||||
|
from connexion import utils
|
||||||
|
|
||||||
|
|
||||||
def test_get_function_from_name():
|
def test_get_function_from_name():
|
||||||
function = utils.get_function_from_name('math.ceil')
|
function = utils.get_function_from_name('math.ceil')
|
||||||
|
|||||||
@@ -1,11 +1,11 @@
|
|||||||
import json
|
import json
|
||||||
|
|
||||||
import flask
|
import flask
|
||||||
|
# we are using "mock" module here for Py 2.7 support
|
||||||
|
from mock import MagicMock
|
||||||
|
|
||||||
from connexion.apis.flask_api import FlaskApi
|
from connexion.apis.flask_api import FlaskApi
|
||||||
from connexion.decorators.validation import ParameterValidator
|
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):
|
def test_parameter_validator(monkeypatch):
|
||||||
|
|||||||
6
tox.ini
6
tox.ini
@@ -43,18 +43,18 @@ commands=python setup.py flake8
|
|||||||
|
|
||||||
[testenv:isort-check]
|
[testenv:isort-check]
|
||||||
basepython=python3
|
basepython=python3
|
||||||
deps=isort
|
deps=isort==4.3.15
|
||||||
changedir={toxinidir}/connexion
|
changedir={toxinidir}/connexion
|
||||||
commands=isort -ns __init__.py -rc -c -df .
|
commands=isort -ns __init__.py -rc -c -df .
|
||||||
|
|
||||||
[testenv:isort-check-examples]
|
[testenv:isort-check-examples]
|
||||||
basepython=python3
|
basepython=python3
|
||||||
deps=isort
|
deps=isort==4.3.15
|
||||||
changedir={toxinidir}/examples
|
changedir={toxinidir}/examples
|
||||||
commands=isort -ns __init__.py -o connexion -rc -c -df .
|
commands=isort -ns __init__.py -o connexion -rc -c -df .
|
||||||
|
|
||||||
[testenv:isort-check-tests]
|
[testenv:isort-check-tests]
|
||||||
basepython=python3
|
basepython=python3
|
||||||
deps=isort
|
deps=isort==4.3.15
|
||||||
changedir={toxinidir}/tests
|
changedir={toxinidir}/tests
|
||||||
commands=isort -ns __init__.py -p connexion -rc -c -df .
|
commands=isort -ns __init__.py -p connexion -rc -c -df .
|
||||||
|
|||||||
Reference in New Issue
Block a user