From 0302c69d49929d5a2d7d1e201a718822d0342020 Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Fri, 28 Jul 2023 12:05:55 +0000 Subject: [PATCH] fix(client): correctly handle environment variable access --- src/increase/_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/increase/_client.py b/src/increase/_client.py index d19c7a357..75f151826 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -125,7 +125,7 @@ def __init__( This automatically infers the `api_key` argument from the `INCREASE_API_KEY` environment variable if it is not provided. """ - api_key = api_key or os.environ.get("INCREASE_API_KEY", "") + api_key = api_key or os.environ.get("INCREASE_API_KEY", None) if not api_key: raise Exception( "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" @@ -403,7 +403,7 @@ def __init__( This automatically infers the `api_key` argument from the `INCREASE_API_KEY` environment variable if it is not provided. """ - api_key = api_key or os.environ.get("INCREASE_API_KEY", "") + api_key = api_key or os.environ.get("INCREASE_API_KEY", None) if not api_key: raise Exception( "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable"