ci: fix remaining ruff issues and run ruff format

We only disable LOG015 rule, as in the simple situation of pmaports,
it doesn't matter too much if in pytest we are using the root logger
or a custom one.

Signed-off-by: Pablo Correa Gómez <pabloyoyoista@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/9363>
This commit is contained in:
Pablo Correa Gómez
2026-08-12 05:39:47 +00:00
parent 6c7b46ef97
commit d035338047
19 changed files with 374 additions and 234 deletions
+6 -3
View File
@@ -12,7 +12,7 @@ import common
if __name__ == "__main__":
if common.commit_message_has_string("[ci:skip-dint]"):
print("WARNING: not linting deviceinfo files ([ci:skip-dint])")
exit(0)
sys.exit(0)
if "deviceinfo_schema.toml" in common.get_changed_files():
print("deviceinfo_schema.toml changed -> checking all deviceinfo files")
@@ -20,8 +20,11 @@ if __name__ == "__main__":
deviceinfo_files = set(glob.glob(pmaports_dir + "/device/*/*/deviceinfo"))
else:
# only lint deviceinfo files in the devices repo
deviceinfo_files = {file for file in common.get_changed_files()
if os.path.basename(file) == "deviceinfo" and file.startswith("device/")}
deviceinfo_files = {
file
for file in common.get_changed_files()
if os.path.basename(file) == "deviceinfo" and file.startswith("device/")
}
try:
subprocess.run(["dint", "check", *deviceinfo_files], text=True, check=True)