if-tuple (F634) 派生自 Pyflakes 代码检查器。 作用 检查使用非空元组作为测试条件的 if 语句。 为什么这不好? 非空元组总是 True,因此以非空元组作为测试条件的 if 语句将始终通过。这可能是一个错误。 示例 if (False,): print("This will always run") 建议改为 if False: print("This will never run") 参考 Python 文档:if 语句