[core] Enable ruff PIE (flake8-pie) lint family (#16658)
This commit is contained in:
1 parent
8b62cfded7
commit
ceb9d406e1
15 files changed
+25
-33
No files matched your search
@@ -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