diff --git a/libs/community/langchain_community/document_loaders/s3_directory.py b/libs/community/langchain_community/document_loaders/s3_directory.py index 545d2059b43ae..24d4afab62365 100644 --- a/libs/community/langchain_community/document_loaders/s3_directory.py +++ b/libs/community/langchain_community/document_loaders/s3_directory.py @@ -121,7 +121,7 @@ def load(self) -> List[Document]: docs = [] for obj in bucket.objects.filter(Prefix=self.prefix): # Skip directories - if obj.size == 0 and obj.key.endswith('/'): + if obj.size == 0 and obj.key.endswith("/"): continue loader = S3FileLoader( self.bucket,