From 96f56cce62ae550a00326c4fd7ed6a7abe0ed449 Mon Sep 17 00:00:00 2001 From: "Carl A. Adams" Date: Mon, 6 Oct 2025 09:09:43 -0700 Subject: [PATCH] subcommands should provide the click context when creating CLI sessions. This enables the session to pick-up options set by the root command. --- planet/cli/destinations.py | 2 +- planet/cli/features.py | 2 +- planet/cli/mosaics.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/planet/cli/destinations.py b/planet/cli/destinations.py index ee185fa3b..139378a9a 100644 --- a/planet/cli/destinations.py +++ b/planet/cli/destinations.py @@ -11,7 +11,7 @@ @asynccontextmanager async def destinations_client(ctx): - async with CliSession() as sess: + async with CliSession(ctx) as sess: cl = DestinationsClient(sess, base_url=ctx.obj['BASE_URL']) yield cl diff --git a/planet/cli/features.py b/planet/cli/features.py index 0c97c2314..6de62afd3 100644 --- a/planet/cli/features.py +++ b/planet/cli/features.py @@ -14,7 +14,7 @@ @asynccontextmanager async def features_client(ctx): - async with CliSession() as sess: + async with CliSession(ctx) as sess: cl = FeaturesClient(sess, base_url=ctx.obj['BASE_URL']) yield cl diff --git a/planet/cli/mosaics.py b/planet/cli/mosaics.py index 8254da449..ce25fa0ef 100644 --- a/planet/cli/mosaics.py +++ b/planet/cli/mosaics.py @@ -13,7 +13,7 @@ @asynccontextmanager async def client(ctx): - async with CliSession() as sess: + async with CliSession(ctx) as sess: cl = MosaicsClient(sess, base_url=ctx.obj['BASE_URL']) yield cl