1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-01 10:52:19 +01:00

[ruff] Enable PERF rules and fix all violations (#9874)

This commit is contained in:
J. Nick Koston
2025-07-25 08:15:54 -10:00
committed by GitHub
parent 88ccde4ba1
commit f808c38f10
18 changed files with 90 additions and 96 deletions

View File

@@ -66,9 +66,10 @@ def main():
)
args = parser.parse_args()
files = []
for path in git_ls_files(["*.cpp", "*.h", "*.tcc"]):
files.append(os.path.relpath(path, os.getcwd()))
cwd = os.getcwd()
files = [
os.path.relpath(path, cwd) for path in git_ls_files(["*.cpp", "*.h", "*.tcc"])
]
if args.files:
# Match against files specified on command-line