[已重新提PR,待Review] feat: 1) support length_not_equal comparison; 2) All length comparators support numbers#5207
Conversation
…n-not-eq # Conflicts: # apps/application/flow/compare/__init__.py # apps/application/flow/compare/is_not_true.py # apps/application/flow/compare/not_contain_compare.py
|
Adding the "do-not-merge/release-note-label-needed" label because no release-note block was detected, please follow our release note process to remove it. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
length_not_equal comparisonlength_not_equal comparison; 2) All length comparators support length comparison of numbers
length_not_equal comparison; 2) All length comparators support length comparison of numberslength_not_equal comparison; 2) All length comparators support numbers
| source_length = len(source_value) if source_value is not None else 0 | ||
| except Exception: | ||
| # 可计算数字长度 | ||
| source_length = len(str(source_value)) |
There was a problem hiding this comment.
- 优化:封装
compute_length方法 - 新特性2:所有长度比较器,都支持比较数字的长度了
| # 长度不等于 比较 | ||
| return source_length != target_length | ||
| except Exception: | ||
| return False |
There was a problem hiding this comment.
新特性1:新增长度不等于 len_not_eq 比较器
|
感谢你的贡献!为了保证提交历史的整洁与可追溯性,项目要求每个 Pull Request 只包含一个 commit。 当前 PR 包含了多个 commit,暂时无法合并。请按以下方式修整后重新提交:
我们期待你的更新,感谢理解和配合! |
|
有点搞不懂哦,Github的Merge功能,是会自动压缩PR为一个commit的啊。 |
|
感谢你的 PR!由于本次提交包含了多个 commit,审核时需要在多个 commit 之间跳转、拼凑完整的改动逻辑,这极大增加了代码审核的难度和时间成本。 为了保证审核质量和效率,本项目要求一个 PR 只包含一个 commit。请将本次改动压缩(squash)为一个 commit 后重新推送,我们会尽快完成审核。感谢你的理解和配合! |
|
已经 rebase 了 |
length_not_equal comparison; 2) All length comparators support numberslength_not_equal comparison; 2) All length comparators support numbers
|
see #5218 |
What this PR does / why we need it?
feat: 1) support
length_not_equalcomparison; 2) All length comparators support numbersSummary of your change
长度不等于 (len_not_eq)比较compute_length(source_value, target_value)。Please indicate you've done the following: