Skip to content

fixes type hinting issues w/ click==8.4#1219

Merged
ischneider merged 1 commit into
mainfrom
fix-click-type-hints
Jun 11, 2026
Merged

fixes type hinting issues w/ click==8.4#1219
ischneider merged 1 commit into
mainfrom
fix-click-type-hints

Conversation

@ischneider

Copy link
Copy Markdown
Member

Related Issue(s):

Closes #1218

Proposed Changes:

Not intended for changelog:

  1. Fix base types of broken params

PR Checklist:

  • [x ] This PR is as small and focused as possible

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses mypy type-check failures introduced by Click 8.4.0 by updating custom CLI ParamType implementations, and removes the Click <8.4.0 dependency cap now that the typing issue is being resolved.

Changes:

  • Loosen the Click dependency constraint to allow Click 8.4+.
  • Update CommaSeparatedString / CommaSeparatedFloat parameter types to avoid overriding StringParamType.convert() with incompatible return types.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
pyproject.toml Removes the Click <8.4.0 cap so newer Click versions can be installed.
planet/cli/types.py Refactors comma-separated param types to align with Click 8.4 typing expectations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread planet/cli/types.py Outdated
Comment on lines 24 to 28
class CommaSeparatedString(click.types.ParamType[list[str]]):
"""A list of strings that is extracted from a comma-separated string."""
name = 'VALUE'

def convert(self, value, param, ctx) -> List[str]:
Comment thread planet/cli/types.py Outdated


class CommaSeparatedFloat(click.types.StringParamType):
class CommaSeparatedFloat(click.types.ParamType[list[float]]):
@ischneider ischneider force-pushed the fix-click-type-hints branch from 7f3f413 to 55e09fa Compare June 11, 2026 19:31
@ischneider ischneider force-pushed the fix-click-type-hints branch from 55e09fa to b0c5165 Compare June 11, 2026 20:53
@ischneider ischneider merged commit a91dca2 into main Jun 11, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Click 8.4.0 breaks type checks

3 participants