Skip to content

Commit

Permalink
Remove unused imports
Browse files Browse the repository at this point in the history
  • Loading branch information
tremble committed Oct 20, 2020
1 parent 375d92f commit b46759e
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 25 deletions.
1 change: 0 additions & 1 deletion plugins/modules/ec2_asg.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,6 @@
from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule
from ansible_collections.amazon.aws.plugins.module_utils.core import is_boto3_error_code
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import AWSRetry
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import camel_dict_to_snake_dict

ASG_ATTRIBUTES = ('AvailabilityZones', 'DefaultCooldown', 'DesiredCapacity',
'HealthCheckGracePeriod', 'HealthCheckType', 'LaunchConfigurationName',
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/ec2_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,7 +803,6 @@
from collections import namedtuple

try:
import boto3
import botocore.exceptions
except ImportError:
pass # caught by AnsibleAWSModule
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/ec2_vpc_nacl_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@
except ImportError:
pass # caught by AnsibleAWSModule

from ansible.module_utils._text import to_native
from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule
from ansible_collections.amazon.aws.plugins.module_utils.core import is_boto3_error_code
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import AWSRetry
Expand Down
2 changes: 0 additions & 2 deletions plugins/modules/elasticache.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,14 +129,12 @@
from time import sleep

try:
import boto3
import botocore
except ImportError:
pass # Handled by AnsibleAWSModule

from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule
from ansible_collections.amazon.aws.plugins.module_utils.core import is_boto3_error_code
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import camel_dict_to_snake_dict
from ansible_collections.amazon.aws.plugins.module_utils.ec2 import get_aws_connection_info


Expand Down
1 change: 0 additions & 1 deletion plugins/modules/elasticache_snapshot.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@
"""

try:
import boto3
import botocore
except ImportError:
pass # Handled by AnsibleAWSModule
Expand Down
2 changes: 0 additions & 2 deletions plugins/modules/execute_lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,6 @@
except ImportError:
pass # Handled by AnsibleAWSModule

from ansible.module_utils._text import to_native

from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule
from ansible_collections.amazon.aws.plugins.module_utils.core import is_boto3_error_code

Expand Down
4 changes: 0 additions & 4 deletions plugins/modules/iam_policy_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,11 @@
type: list
'''

import json

try:
from botocore.exceptions import BotoCoreError, ClientError
except ImportError:
pass

from ansible.module_utils.six import string_types

from ansible_collections.amazon.aws.plugins.module_utils.core import AnsibleAWSModule
from ansible_collections.amazon.aws.plugins.module_utils.core import is_boto3_error_code

Expand Down
1 change: 0 additions & 1 deletion plugins/modules/lambda_alias.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@
import re

try:
import boto3
from botocore.exceptions import ClientError, BotoCoreError
except ImportError:
pass # Handled by AnsibleAWSModule
Expand Down
1 change: 0 additions & 1 deletion plugins/modules/rds_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -750,7 +750,6 @@
try:
from botocore.exceptions import ClientError
from botocore.exceptions import BotoCoreError
from botocore.exceptions import WaiterError
except ImportError:
pass # caught by AnsibleAWSModule

Expand Down
11 changes: 0 additions & 11 deletions plugins/modules/s3_lifecycle.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
notes:
- If specifying expiration time as days then transition time must also be specified in days
- If specifying expiration time as a date then transition time must also be specified as a date
requirements:
- python-dateutil
options:
name:
description:
Expand Down Expand Up @@ -195,12 +193,6 @@
from copy import deepcopy
import datetime

try:
import dateutil.parser
HAS_DATEUTIL = True
except ImportError:
HAS_DATEUTIL = False

try:
from botocore.exceptions import BotoCoreError, ClientError
except ImportError:
Expand Down Expand Up @@ -463,9 +455,6 @@ def main():
['noncurrent_version_transition_days', 'noncurrent_version_transitions'],
],)

if not HAS_DATEUTIL:
module.fail_json(msg='dateutil required for this module')

client = module.client('s3')

expiration_date = module.params.get("expiration_date")
Expand Down

0 comments on commit b46759e

Please sign in to comment.