From 74e2c198654744f7bf8cd7ee08cd91a6471de5f3 Mon Sep 17 00:00:00 2001 From: Steve Pulec Date: Sun, 29 Dec 2013 08:40:38 -0500 Subject: [PATCH] Cleanup unused imports --- moto/ec2/responses/amazon_dev_pay.py | 7 ++----- moto/ec2/responses/customer_gateways.py | 7 ++----- moto/ec2/responses/dhcp_options.py | 7 ++----- moto/ec2/responses/elastic_network_interfaces.py | 7 ++----- moto/ec2/responses/internet_gateways.py | 7 ++----- moto/ec2/responses/ip_addresses.py | 7 ++----- moto/ec2/responses/key_pairs.py | 7 ++----- moto/ec2/responses/monitoring.py | 7 ++----- moto/ec2/responses/network_acls.py | 7 ++----- moto/ec2/responses/placement_groups.py | 7 ++----- moto/ec2/responses/reserved_instances.py | 7 ++----- moto/ec2/responses/route_tables.py | 7 ++----- moto/ec2/responses/virtual_private_gateways.py | 7 ++----- moto/ec2/responses/vm_export.py | 7 ++----- moto/ec2/responses/vm_import.py | 7 ++----- moto/ec2/responses/vpn_connections.py | 7 ++----- moto/ec2/responses/windows.py | 7 ++----- moto/s3bucket_path/models.py | 2 +- moto/sqs/models.py | 2 +- 19 files changed, 36 insertions(+), 87 deletions(-) diff --git a/moto/ec2/responses/amazon_dev_pay.py b/moto/ec2/responses/amazon_dev_pay.py index b5a0cf646..d0ef8893b 100644 --- a/moto/ec2/responses/amazon_dev_pay.py +++ b/moto/ec2/responses/amazon_dev_pay.py @@ -1,9 +1,6 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class AmazonDevPay(object): +class AmazonDevPay(BaseResponse): def confirm_product_instance(self): raise NotImplementedError('AmazonDevPay.confirm_product_instance is not yet implemented') diff --git a/moto/ec2/responses/customer_gateways.py b/moto/ec2/responses/customer_gateways.py index 06c590e4e..1f30a9d16 100644 --- a/moto/ec2/responses/customer_gateways.py +++ b/moto/ec2/responses/customer_gateways.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class CustomerGateways(object): +class CustomerGateways(BaseResponse): def create_customer_gateway(self): raise NotImplementedError('CustomerGateways(AmazonVPC).create_customer_gateway is not yet implemented') diff --git a/moto/ec2/responses/dhcp_options.py b/moto/ec2/responses/dhcp_options.py index 23e73b317..f94abd9be 100644 --- a/moto/ec2/responses/dhcp_options.py +++ b/moto/ec2/responses/dhcp_options.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class DHCPOptions(object): +class DHCPOptions(BaseResponse): def associate_dhcp_options(self): raise NotImplementedError('DHCPOptions(AmazonVPC).associate_dhcp_options is not yet implemented') diff --git a/moto/ec2/responses/elastic_network_interfaces.py b/moto/ec2/responses/elastic_network_interfaces.py index f3624070d..985fc334c 100644 --- a/moto/ec2/responses/elastic_network_interfaces.py +++ b/moto/ec2/responses/elastic_network_interfaces.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class ElasticNetworkInterfaces(object): +class ElasticNetworkInterfaces(BaseResponse): def attach_network_interface(self): raise NotImplementedError('ElasticNetworkInterfaces(AmazonVPC).attach_network_interface is not yet implemented') diff --git a/moto/ec2/responses/internet_gateways.py b/moto/ec2/responses/internet_gateways.py index 772623bc6..c9b24922f 100644 --- a/moto/ec2/responses/internet_gateways.py +++ b/moto/ec2/responses/internet_gateways.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class InternetGateways(object): +class InternetGateways(BaseResponse): def attach_internet_gateway(self): raise NotImplementedError('InternetGateways(AmazonVPC).attach_internet_gateway is not yet implemented') diff --git a/moto/ec2/responses/ip_addresses.py b/moto/ec2/responses/ip_addresses.py index b88a5462e..7d79d2a75 100644 --- a/moto/ec2/responses/ip_addresses.py +++ b/moto/ec2/responses/ip_addresses.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class IPAddresses(object): +class IPAddresses(BaseResponse): def assign_private_ip_addresses(self): raise NotImplementedError('IPAddresses.assign_private_ip_addresses is not yet implemented') diff --git a/moto/ec2/responses/key_pairs.py b/moto/ec2/responses/key_pairs.py index 23e438bfc..fd0a35fe6 100644 --- a/moto/ec2/responses/key_pairs.py +++ b/moto/ec2/responses/key_pairs.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class KeyPairs(object): +class KeyPairs(BaseResponse): def create_key_pair(self): raise NotImplementedError('KeyPairs.create_key_pair is not yet implemented') diff --git a/moto/ec2/responses/monitoring.py b/moto/ec2/responses/monitoring.py index e3fc1611a..40a2a7434 100644 --- a/moto/ec2/responses/monitoring.py +++ b/moto/ec2/responses/monitoring.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class Monitoring(object): +class Monitoring(BaseResponse): def monitor_instances(self): raise NotImplementedError('Monitoring.monitor_instances is not yet implemented') diff --git a/moto/ec2/responses/network_acls.py b/moto/ec2/responses/network_acls.py index abcf1ab6e..56ac36c38 100644 --- a/moto/ec2/responses/network_acls.py +++ b/moto/ec2/responses/network_acls.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class NetworkACLs(object): +class NetworkACLs(BaseResponse): def create_network_acl(self): raise NotImplementedError('NetworkACLs(AmazonVPC).create_network_acl is not yet implemented') diff --git a/moto/ec2/responses/placement_groups.py b/moto/ec2/responses/placement_groups.py index 7f7b881df..2260b8852 100644 --- a/moto/ec2/responses/placement_groups.py +++ b/moto/ec2/responses/placement_groups.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class PlacementGroups(object): +class PlacementGroups(BaseResponse): def create_placement_group(self): raise NotImplementedError('PlacementGroups.create_placement_group is not yet implemented') diff --git a/moto/ec2/responses/reserved_instances.py b/moto/ec2/responses/reserved_instances.py index faf413426..bab7967fd 100644 --- a/moto/ec2/responses/reserved_instances.py +++ b/moto/ec2/responses/reserved_instances.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class ReservedInstances(object): +class ReservedInstances(BaseResponse): def cancel_reserved_instances_listing(self): raise NotImplementedError('ReservedInstances.cancel_reserved_instances_listing is not yet implemented') diff --git a/moto/ec2/responses/route_tables.py b/moto/ec2/responses/route_tables.py index 6266742ed..b9dcfcceb 100644 --- a/moto/ec2/responses/route_tables.py +++ b/moto/ec2/responses/route_tables.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class RouteTables(object): +class RouteTables(BaseResponse): def associate_route_table(self): raise NotImplementedError('RouteTables(AmazonVPC).associate_route_table is not yet implemented') diff --git a/moto/ec2/responses/virtual_private_gateways.py b/moto/ec2/responses/virtual_private_gateways.py index 7f4c8292d..e2bdac7db 100644 --- a/moto/ec2/responses/virtual_private_gateways.py +++ b/moto/ec2/responses/virtual_private_gateways.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class VirtualPrivateGateways(object): +class VirtualPrivateGateways(BaseResponse): def attach_vpn_gateway(self): raise NotImplementedError('VirtualPrivateGateways(AmazonVPC).attach_vpn_gateway is not yet implemented') diff --git a/moto/ec2/responses/vm_export.py b/moto/ec2/responses/vm_export.py index 466c627a6..8a88a709d 100644 --- a/moto/ec2/responses/vm_export.py +++ b/moto/ec2/responses/vm_export.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class VMExport(object): +class VMExport(BaseResponse): def cancel_export_task(self): raise NotImplementedError('VMExport.cancel_export_task is not yet implemented') diff --git a/moto/ec2/responses/vm_import.py b/moto/ec2/responses/vm_import.py index 7bed7c8da..a30cf706c 100644 --- a/moto/ec2/responses/vm_import.py +++ b/moto/ec2/responses/vm_import.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class VMImport(object): +class VMImport(BaseResponse): def cancel_conversion_task(self): raise NotImplementedError('VMImport.cancel_conversion_task is not yet implemented') diff --git a/moto/ec2/responses/vpn_connections.py b/moto/ec2/responses/vpn_connections.py index 1a4dbb75a..61c34336b 100644 --- a/moto/ec2/responses/vpn_connections.py +++ b/moto/ec2/responses/vpn_connections.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class VPNConnections(object): +class VPNConnections(BaseResponse): def create_vpn_connection(self): raise NotImplementedError('VPNConnections(AmazonVPC).create_vpn_connection is not yet implemented') diff --git a/moto/ec2/responses/windows.py b/moto/ec2/responses/windows.py index 4c600c9a3..809c82a1c 100644 --- a/moto/ec2/responses/windows.py +++ b/moto/ec2/responses/windows.py @@ -1,10 +1,7 @@ -from jinja2 import Template - -from moto.ec2.models import ec2_backend -from moto.ec2.utils import resource_ids_from_querystring +from moto.core.responses import BaseResponse -class Windows(object): +class Windows(BaseResponse): def bundle_instance(self): raise NotImplementedError('Windows.bundle_instance is not yet implemented') diff --git a/moto/s3bucket_path/models.py b/moto/s3bucket_path/models.py index 2b7e99539..a32fe18e6 100644 --- a/moto/s3bucket_path/models.py +++ b/moto/s3bucket_path/models.py @@ -2,6 +2,6 @@ from moto.s3.models import S3Backend class S3BucketPathBackend(S3Backend): - True + pass s3bucket_path_backend = S3BucketPathBackend() diff --git a/moto/sqs/models.py b/moto/sqs/models.py index 5c6d04fe7..f82dc3208 100644 --- a/moto/sqs/models.py +++ b/moto/sqs/models.py @@ -100,7 +100,7 @@ class SQSBackend(BaseBackend): def receive_messages(self, queue_name, count): queue = self.get_queue(queue_name) result = [] - for index in range(count): + for _ in range(count): if queue.messages: result.append(queue.messages.pop(0)) return result