From e9038281751f7738b548f54c87f6d4d8c5dc5092 Mon Sep 17 00:00:00 2001 From: Matthew Evans Date: Mon, 4 May 2026 22:19:57 +0100 Subject: [PATCH] Fix shared default value for headers in `BaseDatalabClient` --- src/datalab_api/_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/datalab_api/_base.py b/src/datalab_api/_base.py index cbd7efe..b146986 100644 --- a/src/datalab_api/_base.py +++ b/src/datalab_api/_base.py @@ -35,7 +35,7 @@ class BaseDatalabClient(metaclass=AutoPrettyPrint): _api_key: Optional[str] = None _session: Optional[httpx.Client] = None - _headers: dict[str, str] = {} + _headers: dict[str, str] _timeout: httpx.Timeout = httpx.Timeout(10.0, read=60.0) interactive: bool = True @@ -85,7 +85,7 @@ def __init__(self, datalab_api_url: str, log_level: str = "WARNING"): self.log = logging.getLogger(__name__) self._http_client = httpx.Client - self._headers["User-Agent"] = f"Datalab Python API/{__version__}" + self._headers = {"User-Agent": f"Datalab Python API/{__version__}"} self._detect_api_url()