Closed kaczmarj closed 1 year ago
Base: 83.67% // Head: 88.77% // Increases project coverage by +5.09%
:tada:
Coverage data is based on head (
30cb8d3
) compared to base (95f8f91
). Patch coverage: 84.21% of modified lines in pull request are covered.
:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@Remi-Gau @satra - whenever you are ready, please take a look. good on my end.
a better fix might be to implement the type_cast_value()
instance method on OptionEatAll
but what we have in this PR works... implementing type_cast_value()
wouldn't be so trivial because there might be corner cases that will cause unexpected behavior. so this would require extensive testing. instead, i suggest we do not allow the use of string type in OptionEatAll.
see https://click.palletsprojects.com/en/8.1.x/api/#click.Parameter.type_cast_value
Both of these options use the class OptionEatAll. By default, this class will output a string type, but that would result in a string that looked like a tuple. For example, it is possible to use
ast.literal_eval(value)
on the value to convert it back to a tuple. To fix this, this commit sets the type for --copy and --entrypoint totuple
and the subsequent code expects the values for --copy and --entrypoint to be tuples.This commit also adds a type hint to an OptionsEatAll internal to help with debugging.
related to #498 #499