expr-and-not-expr (SIM220) 源自 flake8-simplify 代码检查器。 修复总是可用的。 作用 检查包含表达式及其否定的 and 表达式。 为什么这不好? 包含表达式及其否定的 and 表达式将始终评估为 False。 示例 x and not x 参考 Python 文档:布尔运算