Skip to content

Commit 3c1521a

Browse files
authored
Fix shared default value for headers in BaseDatalabClient (#94)
1 parent 63dd9e9 commit 3c1521a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/datalab_api/_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class BaseDatalabClient(metaclass=AutoPrettyPrint):
3535

3636
_api_key: Optional[str] = None
3737
_session: Optional[httpx.Client] = None
38-
_headers: dict[str, str] = {}
38+
_headers: dict[str, str]
3939
_timeout: httpx.Timeout = httpx.Timeout(10.0, read=60.0)
4040

4141
interactive: bool = True
@@ -85,7 +85,7 @@ def __init__(self, datalab_api_url: str, log_level: str = "WARNING"):
8585
self.log = logging.getLogger(__name__)
8686

8787
self._http_client = httpx.Client
88-
self._headers["User-Agent"] = f"Datalab Python API/{__version__}"
88+
self._headers = {"User-Agent": f"Datalab Python API/{__version__}"}
8989

9090
self._detect_api_url()
9191

0 commit comments

Comments
 (0)