Implement a custom Click parameter type called PercentageParamType that accepts a floating-point percentage…
Implement a custom Click parameter type called PercentageParamType that accepts a floating-point percentage…: a task in repo2rlenv-code-instruct (Harbor dataset). The type should: - Have name = "percentage" - Accept numeric strings like "50" , "75.5" , "0" , "100" - Return the value divided by 100…
The task
The type should: - Have `name = "percentage"` - Accept numeric strings like `"50"`, `"75.5"`, `"0"`, `"100"` - Return the value divided by 100 (e.g., `"50"` → `0.5`) - Reject values outside [0, 100] by calling `self.fail(...)` with an informative message - Reject non-numeric strings by calling `self.fail(...)`…
Part of FineEnvs/repo2rlenv-code-instruct.