meson-extract-unit-files: apply "ruff format"

This commit is contained in:
Yu Watanabe
2026-05-18 02:44:47 +09:00
parent 3675924f5b
commit 1fbb5e0ff1
+9 -4
View File
@@ -6,15 +6,20 @@ import re
import subprocess import subprocess
import sys import sys
def main(): def main():
build_dir = sys.argv[1] build_dir = sys.argv[1]
out = subprocess.run(["meson", "introspect", "--installed", build_dir], out = subprocess.run(
stdout=subprocess.PIPE, check=True) ['meson', 'introspect', '--installed', build_dir],
stdout=subprocess.PIPE,
check=True,
)
files = json.loads(out.stdout) files = json.loads(out.stdout)
for file in sorted(files.values()): for file in sorted(files.values()):
if re.search("^/usr/lib/systemd/(system|user)/", file) and not file.endswith(".conf"): if re.search('^/usr/lib/systemd/(system|user)/', file) and not file.endswith('.conf'):
print(file) print(file)
if __name__ == "__main__":
if __name__ == '__main__':
main() main()