Description
I just think it's not a good design to validate and reassign things in a function. The function name itself is confusing.
|
def _valid_command_argument(self): |
|
num_exclusive_args_provided = sum( |
|
arg is not None |
|
for arg in (self.commit_msg_file, self.commit_msg, self.rev_range) |
|
) |
|
if num_exclusive_args_provided == 0 and not sys.stdin.isatty(): |
|
self.commit_msg = sys.stdin.read() |
|
elif num_exclusive_args_provided != 1: |
|
raise InvalidCommandArgumentError( |
|
"Only one of --rev-range, --message, and --commit-msg-file is permitted by check command! " |
|
"See 'cz check -h' for more information" |
|
) |
Possible Solution
No response
Additional context
No response
Additional context
No response
Description
I just think it's not a good design to validate and reassign things in a function. The function name itself is confusing.
commitizen/commitizen/commands/check.py
Lines 51 to 62 in 47beadc
Possible Solution
No response
Additional context
No response
Additional context
No response