mirror of
https://github.com/esphome/esphome.git
synced 2026-09-25 05:54:01 +00:00
[core] Enable ruff PIE (flake8-pie) lint family (#16658)
This commit is contained in:
@@ -84,12 +84,7 @@ def indent_list(text: str, padding: str = " ") -> list[str]:
|
||||
"""Indent each line of the given text with the specified padding."""
|
||||
lines = []
|
||||
for line in text.splitlines():
|
||||
if (
|
||||
line == ""
|
||||
or line.startswith("#ifdef")
|
||||
or line.startswith("#if ")
|
||||
or line.startswith("#endif")
|
||||
):
|
||||
if line == "" or line.startswith(("#ifdef", "#if ", "#endif")):
|
||||
p = ""
|
||||
else:
|
||||
p = padding
|
||||
|
||||
Reference in New Issue
Block a user