diff --git a/parsons/aws/s3.py b/parsons/aws/s3.py index 80c33918c..1ee20765b 100644 --- a/parsons/aws/s3.py +++ b/parsons/aws/s3.py @@ -1,12 +1,11 @@ import re import boto3 from botocore.client import ClientError + # from parsons.databases.redshift.redshift import Redshift from parsons.utilities import files import logging import os -import random -import datetime logger = logging.getLogger(__name__) @@ -474,6 +473,6 @@ def get_buckets_with_subname(self, bucket_subname): """ all_buckets = self.list_buckets() - buckets = [x for x in all_buckets if bucket_subname in x.split('-')] + buckets = [x for x in all_buckets if bucket_subname in x.split("-")] return buckets diff --git a/test/test_s3.py b/test/test_s3.py index d752317df..fbc805444 100644 --- a/test/test_s3.py +++ b/test/test_s3.py @@ -38,7 +38,7 @@ def setUp(self): self.tbl_2 = Table([{"first": "Jack", "last": "Smith"}]) csv_path_2 = self.tbl_2.to_csv() - self.test_bucket_subname = self.test_bucket.split('-')[0] + self.test_bucket_subname = self.test_bucket.split("-")[0] # Sometimes it runs into issues putting the file retry = 1 @@ -195,5 +195,7 @@ def test_get_buckets_with_subname(self): buckets_with_subname_true = self.s3.get_buckets_type(self.test_bucket_subname) self.assertTrue(self.test_bucket in buckets_with_subname_true) - buckets_with_subname_false = self.s3.get_buckets_type('bucketsubnamedoesnotexist') + buckets_with_subname_false = self.s3.get_buckets_type( + "bucketsubnamedoesnotexist" + ) self.assertFalse(self.test_bucket in buckets_with_subname_false)