Skip to content

Commit 6a76055

Browse files
author
Cory Waddingham
committed
Corrected linter errors.
1 parent 33a02ac commit 6a76055

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

vsb/databases/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ def get_class(self) -> type[DB]:
2929
case Database.Solr:
3030
from .solr.solr import SolrDB
3131

32-
return SolrDB
32+
return SolrDB

vsb/utils/import.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,16 @@ def main():
1212
"""
1313
parser = argparse.ArgumentParser()
1414
parser.add_argument("--index-name", type=str, required=False, default=os.getenv("PINECONE_INDEX_NAME"), help="Name of the index to import to. If not provided, it will be inferred from the environment variable PINECONE_INDEX_NAME.")
15-
parser.add_argument("--root", type=str, required=True, help="Root of the bucket to import from. This should be in the format s3://<bucket-name>/<path-to-data>.")
15+
parser.add_argument("--root", type=str, required=True, help="Root of the bucket to import from. Provide either s3://<bucket-name>/<path-to-data> or <bucket-name>/<path-to-data>.")
1616
parser.add_argument("--integration-id", type=str, required=True, help="Integration ID for the bucket. This can be found in the Pinecone console.")
1717
args = parser.parse_args()
1818

1919
pc = Pinecone()
2020
index_name = args.index_name or f"vsb-{os.getenv('VSB_WORKLOAD')}"
21-
root = f's3://{args.root}'
21+
if args.root.startswith("s3://"):
22+
root = args.root
23+
else:
24+
root = f's3://{args.root}'
2225
if os.getenv("PINECONE_HOST") is None:
2326
index = pc.Index(name=index_name)
2427
else:

0 commit comments

Comments
 (0)