From 1e6a6b5f1f71c754b94ce44085b5ab12d28b0217 Mon Sep 17 00:00:00 2001 From: Kenneth Daily Date: Fri, 20 Dec 2024 09:37:00 -0800 Subject: [PATCH] Run isort --- awscli/autocomplete/autogen.py | 3 +-- awscli/autocomplete/custom.py | 6 ++++-- awscli/autocomplete/db.py | 3 +-- awscli/autocomplete/generator.py | 4 ++-- awscli/autocomplete/main.py | 6 ++---- awscli/autoprompt/core.py | 6 +++--- awscli/autoprompt/doc.py | 1 + awscli/autoprompt/factory.py | 25 +++++++++++----------- awscli/autoprompt/history.py | 5 ++--- awscli/autoprompt/logger.py | 2 +- awscli/autoprompt/output.py | 5 ++--- awscli/autoprompt/prompttoolkit.py | 10 ++++----- awscli/autoprompt/widgets.py | 22 +++++++++---------- awscli/bcdoc/restdoc.py | 1 + awscli/customizations/addexamples.py | 3 +-- awscli/customizations/argrename.py | 1 - awscli/customizations/arguments.py | 3 ++- awscli/customizations/assumerole.py | 4 ++-- awscli/customizations/awslambda.py | 7 +++--- awscli/customizations/binaryhoist.py | 4 ++-- awscli/customizations/cliinput.py | 2 +- awscli/customizations/cloudfront.py | 7 +++--- awscli/customizations/cloudsearch.py | 5 +++-- awscli/customizations/cloudsearchdomain.py | 1 + awscli/customizations/codecommit.py | 9 ++++---- awscli/customizations/commands.py | 6 +++--- awscli/customizations/ecr.py | 6 +++--- awscli/customizations/ecr_public.py | 6 +++--- awscli/customizations/globalargs.py | 4 ++-- awscli/customizations/iamvirtmfa.py | 7 +++--- awscli/customizations/opsworks.py | 5 ++--- awscli/customizations/paginate.py | 3 +-- awscli/customizations/putmetricdata.py | 2 +- awscli/customizations/rds.py | 3 +-- awscli/customizations/s3events.py | 1 - awscli/customizations/s3uploader.py | 2 +- awscli/customizations/sessendemail.py | 3 +-- awscli/customizations/sessionmanager.py | 8 +++---- awscli/customizations/timestampformat.py | 3 ++- awscli/customizations/toplevelbool.py | 6 ++---- awscli/customizations/translate.py | 8 +++---- awscli/customizations/utils.py | 2 +- awscli/customizations/waiters.py | 4 ++-- 43 files changed, 105 insertions(+), 119 deletions(-) diff --git a/awscli/autocomplete/autogen.py b/awscli/autocomplete/autogen.py index 5ac01d266ecb..83de4635b946 100644 --- a/awscli/autocomplete/autogen.py +++ b/awscli/autocomplete/autogen.py @@ -6,9 +6,8 @@ """ import logging +from collections import defaultdict, namedtuple from difflib import SequenceMatcher -from collections import namedtuple, defaultdict - LOG = logging.getLogger(__name__) Resource = namedtuple('Resource', ['resource_name', 'ident_name', diff --git a/awscli/autocomplete/custom.py b/awscli/autocomplete/custom.py index d9ea75c25e3f..dce40bacbf88 100644 --- a/awscli/autocomplete/custom.py +++ b/awscli/autocomplete/custom.py @@ -10,8 +10,10 @@ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. -from awscli.autocomplete.serverside.custom_completers.ddb.autocomplete import add_ddb_completers -from awscli.autocomplete.serverside.custom_completers.logs.autocomplete import add_log_completers +from awscli.autocomplete.serverside.custom_completers.ddb.autocomplete import \ + add_ddb_completers +from awscli.autocomplete.serverside.custom_completers.logs.autocomplete import \ + add_log_completers def get_custom_completers(): diff --git a/awscli/autocomplete/db.py b/awscli/autocomplete/db.py index 860bba04cb4f..d73c688799d1 100644 --- a/awscli/autocomplete/db.py +++ b/awscli/autocomplete/db.py @@ -1,10 +1,9 @@ -import os import logging +import os import sqlite3 from awscli import __version__ as cli_version - LOG = logging.getLogger(__name__) # We may eventually include a pre-generated version of this index as part diff --git a/awscli/autocomplete/generator.py b/awscli/autocomplete/generator.py index 733fd505e546..5c2ef6bce879 100644 --- a/awscli/autocomplete/generator.py +++ b/awscli/autocomplete/generator.py @@ -13,10 +13,10 @@ """Generates auto completion index.""" import os +from awscli import clidriver +from awscli.autocomplete import db from awscli.autocomplete.local import indexer from awscli.autocomplete.serverside.indexer import APICallIndexer -from awscli.autocomplete import db -from awscli import clidriver def generate_index(filename): diff --git a/awscli/autocomplete/main.py b/awscli/autocomplete/main.py index 8055768a1bd8..f6bb05203449 100644 --- a/awscli/autocomplete/main.py +++ b/awscli/autocomplete/main.py @@ -16,10 +16,8 @@ # everytime a user hits . Try to avoid any expensive module level # work or really heavyweight imports. Prefer to lazy load as much as possible. -from awscli.autocomplete import parser, completer, filters -from awscli.autocomplete.local import model, basic, fetcher -from awscli.autocomplete import serverside -from awscli.autocomplete import custom +from awscli.autocomplete import completer, custom, filters, parser, serverside +from awscli.autocomplete.local import basic, fetcher, model def create_autocompleter(index_filename=None, custom_completers=None, diff --git a/awscli/autoprompt/core.py b/awscli/autoprompt/core.py index 3b0bb900e47f..921141d328be 100644 --- a/awscli/autoprompt/core.py +++ b/awscli/autoprompt/core.py @@ -12,10 +12,10 @@ # language governing permissions and limitations under the License. from botocore.exceptions import ProfileNotFound -from awscli.customizations.exceptions import ParamValidationError -from awscli.autoprompt.prompttoolkit import PromptToolkitPrompter -from awscli.autocomplete.main import create_autocompleter from awscli.autocomplete.filters import fuzzy_filter +from awscli.autocomplete.main import create_autocompleter +from awscli.autoprompt.prompttoolkit import PromptToolkitPrompter +from awscli.customizations.exceptions import ParamValidationError from awscli.errorhandler import SilenceParamValidationMsgErrorHandler diff --git a/awscli/autoprompt/doc.py b/awscli/autoprompt/doc.py index 12933cca0eec..a269d4067fe5 100644 --- a/awscli/autoprompt/doc.py +++ b/awscli/autoprompt/doc.py @@ -11,6 +11,7 @@ # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import io + from docutils.core import publish_string from awscli.bcdoc import docevents, textwriter diff --git a/awscli/autoprompt/factory.py b/awscli/autoprompt/factory.py index 1b35f4b88d66..508a3ee93e13 100644 --- a/awscli/autoprompt/factory.py +++ b/awscli/autoprompt/factory.py @@ -15,24 +15,25 @@ from prompt_toolkit.buffer import Buffer from prompt_toolkit.document import Document from prompt_toolkit.key_binding import KeyBindings +from prompt_toolkit.key_binding.bindings.focus import focus_next from prompt_toolkit.keys import Keys -from prompt_toolkit.layout import Float, FloatContainer, HSplit, Window, VSplit +from prompt_toolkit.layout import Float, FloatContainer, HSplit, VSplit, Window from prompt_toolkit.layout.controls import BufferControl from prompt_toolkit.layout.dimension import Dimension -from prompt_toolkit.layout.layout import Layout, ConditionalContainer -from prompt_toolkit.layout.menus import CompletionsMenu, MultiColumnCompletionsMenu +from prompt_toolkit.layout.layout import ConditionalContainer, Layout +from prompt_toolkit.layout.menus import (CompletionsMenu, + MultiColumnCompletionsMenu) from prompt_toolkit.layout.processors import BeforeInput from prompt_toolkit.widgets import SearchToolbar, VerticalLine -from prompt_toolkit.key_binding.bindings.focus import focus_next -from awscli.autoprompt.history import HistoryDriver, HistoryCompleter -from awscli.autoprompt.widgets import ( - HelpPanelWidget, ToolbarWidget, DebugPanelWidget, TitleLine -) -from awscli.autoprompt.filters import ( - is_one_column, is_multi_column, doc_section_visible, output_section_visible, - input_buffer_has_focus, doc_window_has_focus, is_history_mode -) +from awscli.autoprompt.filters import (doc_section_visible, + doc_window_has_focus, + input_buffer_has_focus, is_history_mode, + is_multi_column, is_one_column, + output_section_visible) +from awscli.autoprompt.history import HistoryCompleter, HistoryDriver +from awscli.autoprompt.widgets import (DebugPanelWidget, HelpPanelWidget, + TitleLine, ToolbarWidget) class PrompterKeyboardInterrupt(KeyboardInterrupt): diff --git a/awscli/autoprompt/history.py b/awscli/autoprompt/history.py index 1a2c6dc6cf3f..4ea50942214d 100644 --- a/awscli/autoprompt/history.py +++ b/awscli/autoprompt/history.py @@ -10,17 +10,16 @@ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. -import logging import json +import logging import os -from prompt_toolkit.completion import Completion, Completer +from prompt_toolkit.completion import Completer, Completion from prompt_toolkit.history import FileHistory from awscli.autocomplete.completer import CompletionResult from awscli.autocomplete.filters import fuzzy_filter - LOG = logging.getLogger(__name__) diff --git a/awscli/autoprompt/logger.py b/awscli/autoprompt/logger.py index 1a5653a09f75..9283e7f99188 100644 --- a/awscli/autoprompt/logger.py +++ b/awscli/autoprompt/logger.py @@ -12,8 +12,8 @@ # language governing permissions and limitations under the License. import logging -from prompt_toolkit.document import Document from prompt_toolkit.application import get_app +from prompt_toolkit.document import Document class PromptToolkitHandler(logging.StreamHandler): diff --git a/awscli/autoprompt/output.py b/awscli/autoprompt/output.py index 01528ca181d9..c931948611de 100644 --- a/awscli/autoprompt/output.py +++ b/awscli/autoprompt/output.py @@ -11,16 +11,15 @@ # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import argparse -import logging import io +import logging import re import jmespath from botocore.utils import ArgumentGenerator -from awscli.formatter import get_formatter from awscli.autocomplete.local.fetcher import CliDriverFetcher - +from awscli.formatter import get_formatter LOG = logging.getLogger(__name__) diff --git a/awscli/autoprompt/prompttoolkit.py b/awscli/autoprompt/prompttoolkit.py index b7e81f364df7..9b115924feb5 100644 --- a/awscli/autoprompt/prompttoolkit.py +++ b/awscli/autoprompt/prompttoolkit.py @@ -13,21 +13,19 @@ import logging import shlex import sys -from contextlib import nullcontext, contextmanager +from contextlib import contextmanager, nullcontext from prompt_toolkit.application import Application -from prompt_toolkit.completion import Completer, ThreadedCompleter -from prompt_toolkit.completion import Completion +from prompt_toolkit.completion import Completer, Completion, ThreadedCompleter from prompt_toolkit.document import Document -from awscli.logger import LOG_FORMAT, disable_crt_logging from awscli.autocomplete import parser from awscli.autocomplete.local import model from awscli.autoprompt.doc import DocsGetter -from awscli.autoprompt.output import OutputGetter from awscli.autoprompt.factory import PromptToolkitFactory from awscli.autoprompt.logger import PromptToolkitHandler - +from awscli.autoprompt.output import OutputGetter +from awscli.logger import LOG_FORMAT, disable_crt_logging LOG = logging.getLogger(__name__) diff --git a/awscli/autoprompt/widgets.py b/awscli/autoprompt/widgets.py index cfd4adefc556..488922d80132 100644 --- a/awscli/autoprompt/widgets.py +++ b/awscli/autoprompt/widgets.py @@ -14,28 +14,26 @@ from functools import partial from prompt_toolkit.application import get_app +from prompt_toolkit.buffer import Buffer +from prompt_toolkit.document import Document from prompt_toolkit.filters import has_focus from prompt_toolkit.formatted_text import HTML, to_formatted_text from prompt_toolkit.formatted_text.utils import fragment_list_to_text -from prompt_toolkit.buffer import Buffer -from prompt_toolkit.document import Document from prompt_toolkit.key_binding import KeyBindings from prompt_toolkit.keys import Keys +from prompt_toolkit.layout import (ConditionalContainer, Float, FloatContainer, + HSplit, VSplit, Window) from prompt_toolkit.layout.controls import BufferControl from prompt_toolkit.layout.dimension import Dimension from prompt_toolkit.layout.processors import Processor, Transformation -from prompt_toolkit.layout import ( - HSplit, Window, VSplit, FloatContainer, Float, ConditionalContainer -) -from prompt_toolkit.widgets import ( - Frame, HorizontalLine, Dialog, Button, TextArea, Label -) +from prompt_toolkit.widgets import (Button, Dialog, Frame, HorizontalLine, + Label, TextArea) from prompt_toolkit.widgets.base import Border -from awscli.autoprompt.filters import ( - help_section_visible, doc_window_has_focus, search_input_has_focus, - input_buffer_has_focus, is_history_mode, is_debug_mode, -) +from awscli.autoprompt.filters import (doc_window_has_focus, + help_section_visible, + input_buffer_has_focus, is_debug_mode, + is_history_mode, search_input_has_focus) class FormatTextProcessor(Processor): diff --git a/awscli/bcdoc/restdoc.py b/awscli/bcdoc/restdoc.py index d194d0e9f0ac..d5df92845e98 100644 --- a/awscli/bcdoc/restdoc.py +++ b/awscli/bcdoc/restdoc.py @@ -13,6 +13,7 @@ import logging from botocore.compat import OrderedDict + from awscli.bcdoc.docstringparser import DocStringParser from awscli.bcdoc.style import ReSTStyle diff --git a/awscli/customizations/addexamples.py b/awscli/customizations/addexamples.py index db34371adfdd..e21dd53a3715 100644 --- a/awscli/customizations/addexamples.py +++ b/awscli/customizations/addexamples.py @@ -26,9 +26,8 @@ For example, ``examples/ec2/ec2-create-key-pair.rst``. """ -import os import logging - +import os LOG = logging.getLogger(__name__) diff --git a/awscli/customizations/argrename.py b/awscli/customizations/argrename.py index eb905df769a9..d5ab60e1073d 100644 --- a/awscli/customizations/argrename.py +++ b/awscli/customizations/argrename.py @@ -15,7 +15,6 @@ from awscli.customizations import utils - ARGUMENT_RENAMES = { # Mapping of original arg to renamed arg. # The key is ..argname diff --git a/awscli/customizations/arguments.py b/awscli/customizations/arguments.py index 43ec260a7aa4..48c63436edfe 100644 --- a/awscli/customizations/arguments.py +++ b/awscli/customizations/arguments.py @@ -13,10 +13,11 @@ import os import re +import jmespath + from awscli.arguments import CustomArgument from awscli.compat import compat_open from awscli.customizations.exceptions import ParamValidationError -import jmespath def resolve_given_outfile_path(path): diff --git a/awscli/customizations/assumerole.py b/awscli/customizations/assumerole.py index b25a80b2def6..0a997e3518e4 100644 --- a/awscli/customizations/assumerole.py +++ b/awscli/customizations/assumerole.py @@ -1,8 +1,8 @@ -import os import logging +import os -from botocore.exceptions import ProfileNotFound from botocore.credentials import JSONFileCache +from botocore.exceptions import ProfileNotFound LOG = logging.getLogger(__name__) CACHE_DIR = os.path.expanduser(os.path.join('~', '.aws', 'cli', 'cache')) diff --git a/awscli/customizations/awslambda.py b/awscli/customizations/awslambda.py index 121488ef18ed..1e7138478b83 100644 --- a/awscli/customizations/awslambda.py +++ b/awscli/customizations/awslambda.py @@ -10,14 +10,13 @@ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. -import zipfile import copy +import zipfile from contextlib import closing -from awscli.arguments import CustomArgument, CLIArgument -from awscli.customizations.exceptions import ParamValidationError +from awscli.arguments import CLIArgument, CustomArgument from awscli.compat import BytesIO - +from awscli.customizations.exceptions import ParamValidationError ERROR_MSG = ( "--zip-file must be a zip file with the fileb:// prefix.\n" diff --git a/awscli/customizations/binaryhoist.py b/awscli/customizations/binaryhoist.py index 94a7d5d6cdd7..247ae4e4a63b 100644 --- a/awscli/customizations/binaryhoist.py +++ b/awscli/customizations/binaryhoist.py @@ -11,10 +11,10 @@ # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import copy - from dataclasses import dataclass from typing import Optional -from awscli.arguments import CustomArgument, CLIArgument + +from awscli.arguments import CLIArgument, CustomArgument from awscli.customizations.exceptions import ParamValidationError diff --git a/awscli/customizations/cliinput.py b/awscli/customizations/cliinput.py index 9b8aa2e254f7..2a5b92d691ba 100644 --- a/awscli/customizations/cliinput.py +++ b/awscli/customizations/cliinput.py @@ -15,9 +15,9 @@ from ruamel.yaml import YAML from ruamel.yaml.error import YAMLError -from awscli.paramfile import get_paramfile, LOCAL_PREFIX_MAP from awscli.argprocess import ParamError, ParamSyntaxError from awscli.customizations.arguments import OverrideRequiredArgsArgument +from awscli.paramfile import LOCAL_PREFIX_MAP, get_paramfile def register_cli_input_args(cli): diff --git a/awscli/customizations/cloudfront.py b/awscli/customizations/cloudfront.py index 6c02bf260dbe..2939a9c51cc6 100644 --- a/awscli/customizations/cloudfront.py +++ b/awscli/customizations/cloudfront.py @@ -11,18 +11,17 @@ # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. import hashlib +import random import sys import time -import random from awscrt.crypto import RSA, RSASignatureAlgorithm - -from botocore.utils import parse_to_aware_datetime from botocore.signers import CloudFrontSigner +from botocore.utils import parse_to_aware_datetime from awscli.arguments import CustomArgument -from awscli.customizations.utils import validate_mutually_exclusive_handler from awscli.customizations.commands import BasicCommand +from awscli.customizations.utils import validate_mutually_exclusive_handler def register(event_handler): diff --git a/awscli/customizations/cloudsearch.py b/awscli/customizations/cloudsearch.py index 8ea8f0a5f265..9c2d245878ff 100644 --- a/awscli/customizations/cloudsearch.py +++ b/awscli/customizations/cloudsearch.py @@ -13,10 +13,11 @@ import logging -from awscli.customizations.flatten import FlattenArguments, SEP -from awscli.customizations.exceptions import ParamValidationError from botocore.compat import OrderedDict +from awscli.customizations.exceptions import ParamValidationError +from awscli.customizations.flatten import SEP, FlattenArguments + LOG = logging.getLogger(__name__) DEFAULT_VALUE_TYPE_MAP = { diff --git a/awscli/customizations/cloudsearchdomain.py b/awscli/customizations/cloudsearchdomain.py index 9a6b16610a6e..5a4ef7a81bfb 100644 --- a/awscli/customizations/cloudsearchdomain.py +++ b/awscli/customizations/cloudsearchdomain.py @@ -19,6 +19,7 @@ """ from awscli.customizations.exceptions import ParamValidationError + def register_cloudsearchdomain(cli): cli.register_last('calling-command.cloudsearchdomain', validate_endpoint_url) diff --git a/awscli/customizations/codecommit.py b/awscli/customizations/codecommit.py index 6b30e834f67f..2baa1c55008f 100644 --- a/awscli/customizations/codecommit.py +++ b/awscli/customizations/codecommit.py @@ -11,18 +11,19 @@ # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. +import datetime +import fileinput +import logging import os import re import sys -import logging -import fileinput -import datetime from botocore.auth import SigV4Auth from botocore.awsrequest import AWSRequest from botocore.compat import urlsplit -from awscli.customizations.commands import BasicCommand + from awscli.compat import NonTranslatedStdout +from awscli.customizations.commands import BasicCommand logger = logging.getLogger('botocore.credentials') diff --git a/awscli/customizations/commands.py b/awscli/customizations/commands.py index 55722888704e..5466bffdd686 100644 --- a/awscli/customizations/commands.py +++ b/awscli/customizations/commands.py @@ -1,5 +1,5 @@ -import logging import copy +import logging import os from botocore import model @@ -10,13 +10,13 @@ from awscli.argparser import ArgTableArgParser, SubCommandArgParser from awscli.argprocess import unpack_argument, unpack_cli_arg from awscli.arguments import CustomArgument, create_argument_model_from_schema +from awscli.bcdoc import docevents from awscli.clidocs import OperationDocumentEventHandler from awscli.commands import CLICommand -from awscli.bcdoc import docevents +from awscli.customizations.exceptions import ParamValidationError from awscli.help import HelpCommand from awscli.schema import SchemaTransformer from awscli.utils import add_command_lineage_to_user_agent_extra -from awscli.customizations.exceptions import ParamValidationError LOG = logging.getLogger(__name__) _open = open diff --git a/awscli/customizations/ecr.py b/awscli/customizations/ecr.py index 71e7abe19b51..10a4e3769d4e 100644 --- a/awscli/customizations/ecr.py +++ b/awscli/customizations/ecr.py @@ -10,12 +10,12 @@ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. +import sys +from base64 import b64decode + from awscli.customizations.commands import BasicCommand from awscli.customizations.utils import create_client_from_parsed_globals -from base64 import b64decode -import sys - def register_ecr_commands(cli): cli.register('building-command-table.ecr', _inject_commands) diff --git a/awscli/customizations/ecr_public.py b/awscli/customizations/ecr_public.py index 01a5458907a2..9d5ed84371e9 100644 --- a/awscli/customizations/ecr_public.py +++ b/awscli/customizations/ecr_public.py @@ -10,12 +10,12 @@ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. +import sys +from base64 import b64decode + from awscli.customizations.commands import BasicCommand from awscli.customizations.utils import create_client_from_parsed_globals -from base64 import b64decode -import sys - def register_ecr_public_commands(cli): cli.register('building-command-table.ecr-public', _inject_commands) diff --git a/awscli/customizations/globalargs.py b/awscli/customizations/globalargs.py index 3a84223f93ce..1646fe9eec59 100644 --- a/awscli/customizations/globalargs.py +++ b/awscli/customizations/globalargs.py @@ -10,13 +10,13 @@ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. -import sys import os +import sys +import jmespath from botocore.client import Config from botocore.endpoint import DEFAULT_TIMEOUT from botocore.handlers import disable_signing -import jmespath from awscli.compat import urlparse from awscli.customizations.exceptions import ParamValidationError diff --git a/awscli/customizations/iamvirtmfa.py b/awscli/customizations/iamvirtmfa.py index c0ee3582d6b4..745e5c99f10c 100644 --- a/awscli/customizations/iamvirtmfa.py +++ b/awscli/customizations/iamvirtmfa.py @@ -24,10 +24,9 @@ """ import base64 -from awscli.customizations.arguments import StatefulArgument -from awscli.customizations.arguments import resolve_given_outfile_path -from awscli.customizations.arguments import is_parsed_result_successful - +from awscli.customizations.arguments import (StatefulArgument, + is_parsed_result_successful, + resolve_given_outfile_path) CHOICES = ('QRCodePNG', 'Base32StringSeed') OUTPUT_HELP = ('The output path and file name where the bootstrap ' diff --git a/awscli/customizations/opsworks.py b/awscli/customizations/opsworks.py index e91d47896fd9..a30b259a8dce 100644 --- a/awscli/customizations/opsworks.py +++ b/awscli/customizations/opsworks.py @@ -24,11 +24,10 @@ from botocore.exceptions import ClientError -from awscli.compat import urlopen, ensure_text_type +from awscli.compat import ensure_text_type, urlopen from awscli.customizations.commands import BasicCommand -from awscli.customizations.utils import create_client_from_parsed_globals from awscli.customizations.exceptions import ParamValidationError - +from awscli.customizations.utils import create_client_from_parsed_globals LOG = logging.getLogger(__name__) diff --git a/awscli/customizations/paginate.py b/awscli/customizations/paginate.py index 77b0f3362ec2..69a40e5321fe 100644 --- a/awscli/customizations/paginate.py +++ b/awscli/customizations/paginate.py @@ -27,9 +27,8 @@ import sys from functools import partial -from botocore import xform_name +from botocore import model, xform_name from botocore.exceptions import DataNotFoundError -from botocore import model from awscli.arguments import BaseCLIArgument from awscli.customizations.exceptions import ParamValidationError diff --git a/awscli/customizations/putmetricdata.py b/awscli/customizations/putmetricdata.py index 10ef322b2323..366af9625519 100644 --- a/awscli/customizations/putmetricdata.py +++ b/awscli/customizations/putmetricdata.py @@ -26,8 +26,8 @@ import decimal from awscli.arguments import CustomArgument -from awscli.utils import split_on_commas from awscli.customizations.utils import validate_mutually_exclusive_handler +from awscli.utils import split_on_commas def register_put_metric_data(event_handler): diff --git a/awscli/customizations/rds.py b/awscli/customizations/rds.py index cac3173f3f76..6a57ccbcb6bd 100644 --- a/awscli/customizations/rds.py +++ b/awscli/customizations/rds.py @@ -24,8 +24,7 @@ """ -from awscli.clidriver import ServiceOperation -from awscli.clidriver import CLIOperationCaller +from awscli.clidriver import CLIOperationCaller, ServiceOperation from awscli.customizations import utils from awscli.customizations.commands import BasicCommand from awscli.customizations.utils import uni_print diff --git a/awscli/customizations/s3events.py b/awscli/customizations/s3events.py index 122c4ca14be7..0b51ff85bc54 100644 --- a/awscli/customizations/s3events.py +++ b/awscli/customizations/s3events.py @@ -13,7 +13,6 @@ """Add S3 specific event streaming output arg.""" from awscli.arguments import CustomArgument - STREAM_HELP_TEXT = 'Filename where the records will be saved' diff --git a/awscli/customizations/s3uploader.py b/awscli/customizations/s3uploader.py index e640b94ba55a..101890db6ac3 100644 --- a/awscli/customizations/s3uploader.py +++ b/awscli/customizations/s3uploader.py @@ -13,9 +13,9 @@ import hashlib import logging -import threading import os import sys +import threading import botocore import botocore.exceptions diff --git a/awscli/customizations/sessendemail.py b/awscli/customizations/sessendemail.py index 938bb0d3ff5e..438aac16a5bf 100644 --- a/awscli/customizations/sessendemail.py +++ b/awscli/customizations/sessendemail.py @@ -22,11 +22,10 @@ """ -from awscli.customizations import utils from awscli.arguments import CustomArgument +from awscli.customizations import utils from awscli.customizations.utils import validate_mutually_exclusive_handler - TO_HELP = ('The email addresses of the primary recipients. ' 'You can specify multiple recipients as space-separated values') CC_HELP = ('The email addresses of copy recipients (Cc). ' diff --git a/awscli/customizations/sessionmanager.py b/awscli/customizations/sessionmanager.py index cfbffe22a298..c7fa8f17635a 100644 --- a/awscli/customizations/sessionmanager.py +++ b/awscli/customizations/sessionmanager.py @@ -10,15 +10,15 @@ # distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF # ANY KIND, either express or implied. See the License for the specific # language governing permissions and limitations under the License. -import logging -import json import errno +import json +import logging import os import re - from subprocess import check_call, check_output + +from awscli.clidriver import CLIOperationCaller, ServiceOperation from awscli.compat import ignore_user_entered_signals -from awscli.clidriver import ServiceOperation, CLIOperationCaller logger = logging.getLogger(__name__) diff --git a/awscli/customizations/timestampformat.py b/awscli/customizations/timestampformat.py index d7e1987b1fd1..7d1e8743ec8f 100644 --- a/awscli/customizations/timestampformat.py +++ b/awscli/customizations/timestampformat.py @@ -27,8 +27,9 @@ in the future. """ -from botocore.utils import parse_timestamp from botocore.exceptions import ProfileNotFound +from botocore.utils import parse_timestamp + from awscli.customizations.exceptions import ConfigurationError diff --git a/awscli/customizations/toplevelbool.py b/awscli/customizations/toplevelbool.py index 8014d2dd98d5..b252c87f621c 100644 --- a/awscli/customizations/toplevelbool.py +++ b/awscli/customizations/toplevelbool.py @@ -19,12 +19,10 @@ import logging from functools import partial - -from awscli.argprocess import detect_shape_structure from awscli import arguments -from awscli.customizations.utils import validate_mutually_exclusive_handler +from awscli.argprocess import detect_shape_structure from awscli.customizations.exceptions import ParamValidationError - +from awscli.customizations.utils import validate_mutually_exclusive_handler LOG = logging.getLogger(__name__) # This sentinel object is used to distinguish when diff --git a/awscli/customizations/translate.py b/awscli/customizations/translate.py index 38add1564dc1..9f66c1ab23ce 100644 --- a/awscli/customizations/translate.py +++ b/awscli/customizations/translate.py @@ -12,11 +12,9 @@ # language governing permissions and limitations under the License. import copy -from awscli.arguments import CustomArgument, CLIArgument -from awscli.customizations.binaryhoist import ( - BinaryBlobArgumentHoister, - ArgumentParameters, -) +from awscli.arguments import CLIArgument, CustomArgument +from awscli.customizations.binaryhoist import (ArgumentParameters, + BinaryBlobArgumentHoister) FILE_DOCSTRING = ( "

The path to the file of the code you are uploading. " diff --git a/awscli/customizations/utils.py b/awscli/customizations/utils.py index 2c281cf0e53e..dc3da3a7fa80 100644 --- a/awscli/customizations/utils.py +++ b/awscli/customizations/utils.py @@ -20,8 +20,8 @@ import xml from botocore.exceptions import ClientError -from awscli.customizations.exceptions import ParamValidationError +from awscli.customizations.exceptions import ParamValidationError _SENTENCE_DELIMETERS_REGEX = re.compile(r'[.:]+') _LINE_BREAK_CHARS = [ diff --git a/awscli/customizations/waiters.py b/awscli/customizations/waiters.py index dd90bd8aa0f8..da00b6a3ada0 100644 --- a/awscli/customizations/waiters.py +++ b/awscli/customizations/waiters.py @@ -14,8 +14,8 @@ from botocore.exceptions import DataNotFoundError from awscli.clidriver import ServiceOperation -from awscli.customizations.commands import BasicCommand, BasicHelp, \ - BasicDocHandler +from awscli.customizations.commands import (BasicCommand, BasicDocHandler, + BasicHelp) def register_add_waiters(cli):