From d25f67067b1d0aa9ddd5c90202db95d82aacc55d Mon Sep 17 00:00:00 2001 From: Dmitry Dygalo Date: Fri, 18 Sep 2020 19:02:16 +0200 Subject: [PATCH] chore: Remove unused imports --- src/schemathesis/cli/__init__.py | 4 +--- src/schemathesis/fixups/__init__.py | 2 +- test/apps/utils.py | 6 +++--- test/test_loaders.py | 3 ++- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/schemathesis/cli/__init__.py b/src/schemathesis/cli/__init__.py index a50bb14952..a30c7638d1 100644 --- a/src/schemathesis/cli/__init__.py +++ b/src/schemathesis/cli/__init__.py @@ -6,11 +6,10 @@ import click import hypothesis -import requests import yaml from .. import checks as checks_module -from .. import models, runner +from .. import runner from .. import targets as targets_module from ..fixups import ALL_FIXUPS from ..hooks import GLOBAL_HOOK_DISPATCHER, HookContext, HookDispatcher, HookScope @@ -18,7 +17,6 @@ from ..runner import DEFAULT_STATEFUL_RECURSION_LIMIT, events from ..targets import Target from ..types import Filter -from ..utils import WSGIResponse from . import callbacks, cassettes, output from .context import ExecutionContext from .handlers import EventHandler diff --git a/src/schemathesis/fixups/__init__.py b/src/schemathesis/fixups/__init__.py index a7cc94fb1a..b9325aac68 100644 --- a/src/schemathesis/fixups/__init__.py +++ b/src/schemathesis/fixups/__init__.py @@ -1,4 +1,4 @@ -from typing import Iterable, List, Optional +from typing import Iterable, Optional from . import fast_api diff --git a/test/apps/utils.py b/test/apps/utils.py index d9f98613a3..93b007273c 100644 --- a/test/apps/utils.py +++ b/test/apps/utils.py @@ -53,9 +53,9 @@ def make_openapi_schema(endpoints: Tuple[str, ...], version: OpenAPIVersion = Op then the app will contain GET /success and GET /failure """ - return {OpenAPIVersion("2.0"): _make_openapi_2_schema, OpenAPIVersion("3.0"): _make_openapi_3_schema,}[ - version - ](endpoints) + return {OpenAPIVersion("2.0"): _make_openapi_2_schema, OpenAPIVersion("3.0"): _make_openapi_3_schema}[version]( + endpoints + ) def make_node_definition(reference): diff --git a/test/test_loaders.py b/test/test_loaders.py index a567ed2958..a384f1d70b 100644 --- a/test/test_loaders.py +++ b/test/test_loaders.py @@ -67,7 +67,8 @@ def test_operation_id(operation_id): def test_number_deserializing(testdir): - # When numbers in schema are written in scientific notation but without a dot (achieved by dumping the schema with json.dumps) + # When numbers in schema are written in scientific notation but without a dot + # (achieved by dumping the schema with json.dumps) schema = { "openapi": "3.0.2", "info": {"title": "Test", "description": "Test", "version": "0.1.0"},