[core] Enable ruff PIE (flake8-pie) lint family (#16658)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2026-05-26 07:46:44 -04:00
1 parent 8b62cfded7
commit ceb9d406e1
15 files changed
+25 -33

No files matched your search

+1 -6
View File
@@ -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