lru-cache-without-parameters (UP011)
源自 pyupgrade linter。
修复总是可用的。
作用
检查 functools.lru_cache
装饰器上不必要的括号。
为什么这不好?
自 Python 3.8 起,functools.lru_cache
可以用作装饰器,无需尾随括号,只要没有参数传递给它。
示例
建议改为
源自 pyupgrade linter。
修复总是可用的。
检查 functools.lru_cache
装饰器上不必要的括号。
自 Python 3.8 起,functools.lru_cache
可以用作装饰器,无需尾随括号,只要没有参数传递给它。
建议改为