ITADN

Remove an unnecessary conditional

#22Pull Requestkurtmckee 创建于 2024-07-31
K
kurtmckeecommented
This PR removes the `if chunks:` conditional and dedents the conditional block, since `if chunks:` is always True. Removing the conditional allows the test coverage fail-under value to increase to 100%; previously it was at 99% because the conditional branch never evaluated to `False`, so branch coverage wasn't complete. > ![image](https://github.com/user-attachments/assets/aab0d8a7-7d20-4532-bc9c-eb8a39ce1595) It's easy to confirm that the condition will always be `True`, even when the string being split is empty: ```pycon >>> "".split("a") [''] >>> bool("".split("a")) True ```
合并状态:未合并 关闭于 2024-07-31 1 条评论