Skip to content

Commit 072ac37

Browse files
committed
fix: bitbucket connector: update return type annotation in connector.py and clean up params initialization
1 parent cd29316 commit 072ac37

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

backend/onyx/connectors/bitbucket/connector.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def _build_params(
104104
fields: str = PR_LIST_RESPONSE_FIELDS,
105105
start: SecondsSinceUnixEpoch | None = None,
106106
end: SecondsSinceUnixEpoch | None = None,
107-
) -> dict[str, Any] | None:
107+
) -> dict[str, Any]:
108108
"""Build Bitbucket fetch params honoring pruning and optional time window.
109109
110110
Respects start/end if BOTH are provided.
@@ -113,7 +113,6 @@ def _build_params(
113113
- prune_days > 0: include OPEN (with optional start/end);
114114
for MERGED/DECLINED require updated_on >= max(threshold, start) and <= end (if provided).
115115
"""
116-
base: dict[str, Any] = {"fields": fields, "pagelen": self.batch_size}
117116

118117
# Compute common time bounds
119118
start_iso = (
@@ -132,7 +131,7 @@ def _tc(lower: str | None, upper: str | None) -> str | None:
132131
return f'(updated_on >= "{lower}" AND updated_on <= "{upper}")'
133132
return None
134133

135-
params = base
134+
params: dict[str, Any] = {"fields": fields, "pagelen": self.batch_size}
136135
if self._prune_days == -1:
137136
# All states, optional global window
138137
time_clause = _tc(start_iso, end_iso)

backend/tests/daily/connectors/bitbucket/test_bitbucket_basic.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ def bitbucket_connector() -> BitbucketConnector:
1919
- BITBUCKET_WORKSPACE: workspace id
2020
- BITBUCKET_REPOSITORIES: comma-separated slugs
2121
- BITBUCKET_PROJECTS: optional comma-separated project keys
22-
- BITBUCKET_PRUNE_DAYS: optional int for prune_closed_prs_after_days
2322
"""
2423
workspace = os.environ.get("BITBUCKET_WORKSPACE", "dokv")
2524
repositories = os.environ.get("BITBUCKET_REPOSITORIES")

0 commit comments

Comments
 (0)