1414
1515import click
1616import pathlib
17- from typing import Any , Callable
17+ from typing import Any , Callable , Optional
1818
1919from planet_auth_utils .constants import EnvironmentVariables
2020
2525# TODO: Should we make "required" param universal for all options?
2626# Maybe rather than being so prescriptive, we pass **kwargs to click options?
2727def opt_api_key (
28- default = None , hidden : bool = False , envvar : str = EnvironmentVariables .AUTH_API_KEY
28+ default = None , hidden : bool = False , envvar : Optional [ str ] = EnvironmentVariables .AUTH_API_KEY
2929) -> _click_option_decorator_type :
3030 """
3131 Click option for specifying an API key
@@ -48,7 +48,7 @@ def decorator(function) -> _click_option_decorator_type:
4848
4949
5050def opt_audience (
51- default = None , hidden : bool = False , required = False , envvar : str = EnvironmentVariables .AUTH_AUDIENCE
51+ default = None , hidden : bool = False , required = False , envvar : Optional [ str ] = EnvironmentVariables .AUTH_AUDIENCE
5252) -> _click_option_decorator_type :
5353 """
5454 Click option for specifying an OAuth token audience for the
@@ -76,7 +76,7 @@ def decorator(function) -> _click_option_decorator_type:
7676
7777
7878def opt_client_id (
79- default = None , hidden : bool = False , envvar : str = EnvironmentVariables .AUTH_CLIENT_ID
79+ default = None , hidden : bool = False , envvar : Optional [ str ] = EnvironmentVariables .AUTH_CLIENT_ID
8080) -> _click_option_decorator_type :
8181 """
8282 Click option for specifying an OAuth client ID.
@@ -99,7 +99,7 @@ def decorator(function) -> _click_option_decorator_type:
9999
100100
101101def opt_client_secret (
102- default = None , hidden : bool = False , envvar : str = EnvironmentVariables .AUTH_CLIENT_SECRET
102+ default = None , hidden : bool = False , envvar : Optional [ str ] = EnvironmentVariables .AUTH_CLIENT_SECRET
103103) -> _click_option_decorator_type :
104104 """
105105 Click option for specifying an OAuth client secret.
@@ -122,7 +122,7 @@ def decorator(function) -> _click_option_decorator_type:
122122
123123
124124def opt_extra (
125- default = None , hidden : bool = False , envvar : str = EnvironmentVariables .AUTH_EXTRA
125+ default = None , hidden : bool = False , envvar : Optional [ str ] = EnvironmentVariables .AUTH_EXTRA
126126) -> _click_option_decorator_type :
127127 """
128128 Click option for specifying extra options.
@@ -169,7 +169,7 @@ def decorator(function) -> _click_option_decorator_type:
169169
170170
171171def opt_issuer (
172- default = None , hidden : bool = False , required = False , envvar : str = EnvironmentVariables .AUTH_ISSUER
172+ default = None , hidden : bool = False , required = False , envvar : Optional [ str ] = EnvironmentVariables .AUTH_ISSUER
173173) -> _click_option_decorator_type :
174174 """
175175 Click option for specifying an OAuth token issuer for the
@@ -194,7 +194,7 @@ def decorator(function) -> _click_option_decorator_type:
194194
195195
196196def opt_loglevel (
197- default = "INFO" , hidden : bool = False , envvar : str = EnvironmentVariables .AUTH_LOGLEVEL
197+ default = "INFO" , hidden : bool = False , envvar : Optional [ str ] = EnvironmentVariables .AUTH_LOGLEVEL
198198) -> _click_option_decorator_type :
199199 """
200200 Click option for specifying a log level.
@@ -257,7 +257,7 @@ def decorator(function) -> _click_option_decorator_type:
257257
258258
259259def opt_organization (
260- default = None , hidden : bool = False , envvar : str = EnvironmentVariables .AUTH_ORGANIZATION
260+ default = None , hidden : bool = False , envvar : Optional [ str ] = EnvironmentVariables .AUTH_ORGANIZATION
261261) -> _click_option_decorator_type :
262262 """
263263 Click option for specifying an Organization.
@@ -287,7 +287,7 @@ def decorator(function) -> _click_option_decorator_type:
287287# lib also handles things like browser interaction this is not entirely easy to abstract
288288# away.
289289def opt_password (
290- default = None , hidden : bool = True , envvar : str = EnvironmentVariables .AUTH_PASSWORD
290+ default = None , hidden : bool = True , envvar : Optional [ str ] = EnvironmentVariables .AUTH_PASSWORD
291291) -> _click_option_decorator_type :
292292 """
293293 Click option for specifying a password for the
@@ -311,7 +311,7 @@ def decorator(function) -> _click_option_decorator_type:
311311
312312
313313def opt_profile (
314- default = None , hidden : bool = False , envvar : str = EnvironmentVariables .AUTH_PROFILE
314+ default = None , hidden : bool = False , envvar : Optional [ str ] = EnvironmentVariables .AUTH_PROFILE
315315) -> _click_option_decorator_type :
316316 """
317317 Click option for specifying an auth profile for the
@@ -336,7 +336,7 @@ def decorator(function) -> _click_option_decorator_type:
336336
337337
338338def opt_project (
339- default = None , hidden : bool = False , envvar : str = EnvironmentVariables .AUTH_PROJECT
339+ default = None , hidden : bool = False , envvar : Optional [ str ] = EnvironmentVariables .AUTH_PROJECT
340340) -> _click_option_decorator_type :
341341 """
342342 Click option for specifying a project ID.
@@ -397,7 +397,7 @@ def decorator(function) -> _click_option_decorator_type:
397397
398398
399399def opt_token (
400- default = None , hidden : bool = False , envvar : str = EnvironmentVariables .AUTH_TOKEN
400+ default = None , hidden : bool = False , envvar : Optional [ str ] = EnvironmentVariables .AUTH_TOKEN
401401) -> _click_option_decorator_type :
402402 """
403403 Click option for specifying a token literal.
@@ -421,7 +421,7 @@ def decorator(function) -> _click_option_decorator_type:
421421
422422
423423def opt_scope (
424- default = None , hidden : bool = False , envvar : str = EnvironmentVariables .AUTH_SCOPE
424+ default = None , hidden : bool = False , envvar : Optional [ str ] = EnvironmentVariables .AUTH_SCOPE
425425) -> _click_option_decorator_type :
426426 """
427427 Click option for specifying an OAuth token scope for the
@@ -468,7 +468,7 @@ def decorator(function) -> _click_option_decorator_type:
468468
469469
470470def opt_token_file (
471- default = None , hidden : bool = False , envvar : str = EnvironmentVariables .AUTH_TOKEN_FILE
471+ default = None , hidden : bool = False , envvar : Optional [ str ] = EnvironmentVariables .AUTH_TOKEN_FILE
472472) -> _click_option_decorator_type :
473473 """
474474 Click option for specifying a token file location for the
@@ -492,7 +492,7 @@ def decorator(function) -> _click_option_decorator_type:
492492
493493
494494def opt_username (
495- default = None , hidden : bool = True , envvar : str = EnvironmentVariables .AUTH_USERNAME
495+ default = None , hidden : bool = True , envvar : Optional [ str ] = EnvironmentVariables .AUTH_USERNAME
496496) -> _click_option_decorator_type :
497497 """
498498 Click option for specifying a username for the
0 commit comments