Skip to content

Commit 1d287aa

Browse files
make recommended changes
1 parent a7e674a commit 1d287aa

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

backend/onyx/connectors/file/connector.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
from pathlib import Path
55
from typing import Any
66
from typing import IO
7-
from typing import Optional
87

98
from onyx.configs.app_configs import INDEX_BATCH_SIZE
109
from onyx.configs.constants import DocumentSource
@@ -236,21 +235,13 @@ class LocalFileConnector(LoadConnector):
236235
def __init__(
237236
self,
238237
file_locations: list[Path | str],
239-
file_names: Optional[list[str]] = None, # Must accept this parameter as connector_specific_config is unpacked as args
240-
zip_metadata: Optional[dict[str, Any]] = None,
238+
file_names: list[str] | None = None,
239+
zip_metadata: dict[str, Any] | None = None,
241240
batch_size: int = INDEX_BATCH_SIZE,
242241
) -> None:
243242
self.file_locations = [str(loc) for loc in file_locations]
244-
245-
# Resolve file_names: prefer explicit list, fall back to locations
246-
if file_names is None:
247-
file_names = self.file_locations
248-
else:
249-
# Ensure we have a concrete list of strings
250-
file_names = [str(name) for name in file_names]
251-
252243
self.batch_size = batch_size
253-
self.pdf_pass: Optional[str] = None
244+
self.pdf_pass: str | None = None
254245
self.zip_metadata = zip_metadata or {}
255246

256247
def load_credentials(self, credentials: dict[str, Any]) -> dict[str, Any] | None:

deployment/helm/charts/onyx/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ home: https://www.onyx.app/
55
sources:
66
- "https://github.com/onyx-dot-app/onyx"
77
type: application
8-
version: 0.2.5
8+
version: 0.2.6
99
appVersion: latest
1010
annotations:
1111
category: Productivity

0 commit comments

Comments
 (0)