我偶尔会花大量时间在我的代码中追踪brainfarts ......虽然我通常对它运行pylint,但有些事情会跳过pylint。我最容易忽略的问题是这个......
# normally, variable is populated from parsed text, so it's not predictable
variable = 'fOoBaR'
if variable.lower == 'foobar':
# ^^^^^<------------------ should be .lower()
do_something()
pylint 和 Python 都没有对此嗤之以鼻……是否有可以标记此特定问题的 python 代码检查工具?