Skip to content

Commit

Permalink
Run isort
Browse files Browse the repository at this point in the history
  • Loading branch information
kdaily committed Dec 18, 2024
1 parent ff1a30b commit eba6a8f
Show file tree
Hide file tree
Showing 19 changed files with 185 additions and 186 deletions.
2 changes: 1 addition & 1 deletion awscli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
A Universal Command Line Environment for Amazon Web Services.
"""

import os
import importlib.abc
import os
import sys

__version__ = '2.22.12'
Expand Down
1 change: 0 additions & 1 deletion awscli/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@

from awscli.clidriver import main


if __name__ == "__main__":
sys.exit(main())
6 changes: 2 additions & 4 deletions awscli/alias.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,10 @@
import shlex
import subprocess

from botocore.configloader import raw_config_parse

from awscli.compat import compat_shell_quote
from awscli.commands import CLICommand
from awscli.compat import compat_shell_quote
from awscli.utils import emit_top_level_args_parsed_event

from botocore.configloader import raw_config_parse

LOG = logging.getLogger(__name__)

Expand Down
1 change: 0 additions & 1 deletion awscli/argparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import sys
from difflib import get_close_matches


HELP_BLURB = (
"To see help text, you can run:\n"
"\n"
Expand Down
8 changes: 3 additions & 5 deletions awscli/argprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,16 @@
# language governing permissions and limitations under the License.
"""Module for processing CLI args."""

import os
import logging
import os

from botocore.compat import OrderedDict, json

from awscli import SCALAR_TYPES, COMPLEX_TYPES
from awscli import shorthand
from awscli import COMPLEX_TYPES, SCALAR_TYPES, shorthand
from awscli.utils import (
find_service_and_method_in_event_name,
is_document_type,
is_document_type_container,
)
from botocore.compat import OrderedDict, json
from botocore.utils import is_json_value_header

LOG = logging.getLogger('awscli.argprocess')
Expand Down
7 changes: 2 additions & 5 deletions awscli/arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,10 @@

import logging

from botocore import xform_name
from botocore.hooks import first_non_none_response

from awscli.argprocess import unpack_cli_arg
from awscli.schema import SchemaTransformer
from botocore import model

from botocore import model, xform_name
from botocore.hooks import first_non_none_response

LOG = logging.getLogger('awscli.arguments')

Expand Down
8 changes: 4 additions & 4 deletions awscli/clidocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
import logging
import os
import re
from botocore import xform_name
from botocore.model import StringShape
from botocore.utils import is_json_value_header

from awscli import SCALAR_TYPES
from awscli.argprocess import ParamShorthandDocGen
Expand All @@ -24,10 +21,13 @@
from awscli.utils import (
find_service_and_method_in_event_name,
is_document_type,
operation_uses_document_types,
is_streaming_blob_type,
is_tagged_union_type,
operation_uses_document_types,
)
from botocore import xform_name
from botocore.model import StringShape
from botocore.utils import is_json_value_header

LOG = logging.getLogger(__name__)
EXAMPLES_DIR = os.path.join(
Expand Down
92 changes: 49 additions & 43 deletions awscli/clidriver.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,70 +10,76 @@
# 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 copy
import json
import logging
import os
import platform
import sys
import copy
import logging
import re
import sys

import distro
import botocore.session
from botocore import xform_name
from botocore.compat import copy_kwargs, OrderedDict
from botocore.history import get_global_history_recorder
from botocore.configprovider import InstanceVarProvider
from botocore.configprovider import EnvironmentProvider
from botocore.configprovider import ScopedConfigProvider
from botocore.configprovider import ConstantProvider
from botocore.configprovider import ChainProvider

import botocore.session
from awscli import __version__
from awscli.alias import AliasCommandInjector, AliasLoader
from awscli.argparser import (
ArgTableArgParser,
FirstPassGlobalArgParser,
MainArgParser,
ServiceArgParser,
SubCommandArgParser,
)
from awscli.argprocess import unpack_argument
from awscli.arguments import (
BooleanArgument,
CLIArgument,
CustomArgument,
ListArgument,
UnknownArgumentError,
)
from awscli.autoprompt.core import AutoPromptDriver
from awscli.commands import CLICommand
from awscli.compat import (
default_pager,
get_stderr_text_writer,
get_stdout_text_writer,
)
from awscli.constants import PARAM_VALIDATION_ERROR_RC
from awscli.errorhandler import (
construct_cli_error_handlers_chain,
construct_entry_point_handlers_chain,
)
from awscli.formatter import get_formatter
from awscli.plugin import load_plugins
from awscli.commands import CLICommand
from awscli.argparser import MainArgParser
from awscli.argparser import FirstPassGlobalArgParser
from awscli.argparser import ServiceArgParser
from awscli.argparser import ArgTableArgParser
from awscli.argparser import SubCommandArgParser
from awscli.help import ProviderHelpCommand
from awscli.help import ServiceHelpCommand
from awscli.help import OperationHelpCommand
from awscli.arguments import CustomArgument
from awscli.arguments import ListArgument
from awscli.arguments import BooleanArgument
from awscli.arguments import CLIArgument
from awscli.arguments import UnknownArgumentError
from awscli.argprocess import unpack_argument
from awscli.alias import AliasLoader
from awscli.alias import AliasCommandInjector
from awscli.help import (
OperationHelpCommand,
ProviderHelpCommand,
ServiceHelpCommand,
)
from awscli.logger import (
set_stream_logger,
remove_stream_logger,
enable_crt_logging,
disable_crt_logging,
enable_crt_logging,
remove_stream_logger,
set_stream_logger,
)
from awscli.plugin import load_plugins
from awscli.utils import (
add_metadata_component_to_user_agent_extra,
IMDSRegionProvider,
OutputStreamFactory,
add_command_lineage_to_user_agent_extra,
add_metadata_component_to_user_agent_extra,
emit_top_level_args_parsed_event,
)
from awscli.utils import emit_top_level_args_parsed_event
from awscli.utils import OutputStreamFactory
from awscli.utils import IMDSRegionProvider
from awscli.constants import PARAM_VALIDATION_ERROR_RC
from awscli.autoprompt.core import AutoPromptDriver
from awscli.errorhandler import (
construct_cli_error_handlers_chain,
construct_entry_point_handlers_chain,
from botocore import xform_name
from botocore.compat import OrderedDict, copy_kwargs
from botocore.configprovider import (
ChainProvider,
ConstantProvider,
EnvironmentProvider,
InstanceVarProvider,
ScopedConfigProvider,
)

from botocore.history import get_global_history_recorder

LOG = logging.getLogger('awscli.clidriver')
LOG_FORMAT = (
Expand Down
30 changes: 15 additions & 15 deletions awscli/compat.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,31 +6,31 @@

# http://aws.amazon.com/apache2.0/

import collections.abc as collections_abc
import contextlib
import io
import locale
import os
import os.path
import platform
import queue
import re
import shlex
import signal

# or in the "license" file accompanying this file. This file is
# 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 re
import shlex
import os
import os.path
import platform
import urllib.parse as urlparse
import zipfile
import signal
import contextlib
import collections.abc as collections_abc
import locale
import queue
import io
from urllib.request import urlopen
from configparser import RawConfigParser
from functools import partial
import urllib.parse as urlparse
from urllib.error import URLError
from urllib.request import urlopen

from botocore.compat import six
from botocore.compat import OrderedDict
from botocore.compat import OrderedDict, six

# Backwards compatible definitions from six
PY3 = sys.version_info[0] == 3
Expand Down
24 changes: 10 additions & 14 deletions awscli/errorhandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,25 @@
import logging
import signal

from botocore.exceptions import (
NoRegionError,
NoCredentialsError,
ClientError,
ParamValidationError as BotocoreParamValidationError,
)

from awscli.argparser import USAGE, ArgParseException
from awscli.argprocess import ParamError, ParamSyntaxError
from awscli.arguments import UnknownArgumentError
from awscli.argparser import ArgParseException, USAGE
from awscli.autoprompt.factory import PrompterKeyboardInterrupt
from awscli.constants import (
PARAM_VALIDATION_ERROR_RC,
CONFIGURATION_ERROR_RC,
CLIENT_ERROR_RC,
CONFIGURATION_ERROR_RC,
GENERAL_ERROR_RC,
PARAM_VALIDATION_ERROR_RC,
)
from awscli.utils import PagerInitializationException
from awscli.autoprompt.factory import PrompterKeyboardInterrupt
from awscli.customizations.exceptions import (
ParamValidationError,
ConfigurationError,
ParamValidationError,
)
from awscli.utils import PagerInitializationException
from botocore.exceptions import ClientError, NoCredentialsError, NoRegionError
from botocore.exceptions import (
ParamValidationError as BotocoreParamValidationError,
)


LOG = logging.getLogger(__name__)

Expand Down
12 changes: 5 additions & 7 deletions awscli/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,14 @@
import logging
from datetime import datetime

from botocore.compat import json
from botocore.utils import set_value_from_jmespath
from botocore.paginate import PageIterator
from ruamel.yaml import YAML

from awscli.table import MultiTable, Styler, ColorizedStyler
from awscli import text
from awscli import compat
from awscli import compat, text
from awscli.table import ColorizedStyler, MultiTable, Styler
from awscli.utils import json_encoder

from botocore.compat import json
from botocore.paginate import PageIterator
from botocore.utils import set_value_from_jmespath

LOG = logging.getLogger(__name__)

Expand Down
Loading

0 comments on commit eba6a8f

Please sign in to comment.