Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions planet/cli/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,15 @@
from planet import exceptions, io


class CommaSeparatedString(click.types.StringParamType):
class CommaSeparatedString(click.ParamType):
"""A list of strings that is extracted from a comma-separated string."""
name = 'VALUE'

def convert(self, value, param, ctx) -> List[str]:
if isinstance(value, list):
convlist = value
else:
convstr = super().convert(value, param, ctx)
convstr = click.STRING.convert(value, param, ctx)

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


class CommaSeparatedFloat(click.types.StringParamType):
class CommaSeparatedFloat(click.ParamType):
"""A list of floats that is extracted from a comma-separated string."""
name = 'VALUE'

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name = "planet"
authors = [{ name = "Planet", email = "python-sdk-contributors@planet.com" }]
description = "Planet SDK for Python"
dependencies = [
"click (>=8.0,!=8.2.1,<8.4.0)",
"click (>=8.0,!=8.2.1)",
"geojson",
"httpx>=0.28.0",
"jsonschema",
Expand Down
Loading