Skip to content

Commit 7f3f413

Browse files
committed
fixes type hinting issues w/ click==8.4
1 parent 490e795 commit 7f3f413

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

planet/cli/types.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,15 @@
2121
from planet import exceptions, io
2222

2323

24-
class CommaSeparatedString(click.types.StringParamType):
24+
class CommaSeparatedString(click.types.ParamType[list[str]]):
2525
"""A list of strings that is extracted from a comma-separated string."""
26+
name = 'VALUE'
2627

2728
def convert(self, value, param, ctx) -> List[str]:
2829
if isinstance(value, list):
2930
convlist = value
3031
else:
31-
convstr = super().convert(value, param, ctx)
32+
convstr = str(value)
3233

3334
if convstr == '':
3435
self.fail('Entry cannot be an empty string.')
@@ -42,7 +43,7 @@ def convert(self, value, param, ctx) -> List[str]:
4243
return convlist
4344

4445

45-
class CommaSeparatedFloat(click.types.StringParamType):
46+
class CommaSeparatedFloat(click.types.ParamType[list[float]]):
4647
"""A list of floats that is extracted from a comma-separated string."""
4748
name = 'VALUE'
4849

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ name = "planet"
77
authors = [{ name = "Planet", email = "python-sdk-contributors@planet.com" }]
88
description = "Planet SDK for Python"
99
dependencies = [
10-
"click (>=8.0,!=8.2.1,<8.4.0)",
10+
"click (>=8.0,!=8.2.1)",
1111
"geojson",
1212
"httpx>=0.28.0",
1313
"jsonschema",

0 commit comments

Comments
 (0)