nixbot

builds
1treefmt v2.5.0ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 123EXE001 Shebang is present but file is not executable4 --> modules/biodb/scripts/biodb-helper.py:1:15 |61 | #!/usr/bin/env python37 | ^^^^^^^^^^^^^^^^^^^^^^82 | """Small state/publish helper for biodb shell recipes."""9 |1011EXE001 Shebang is present but file is not executable12 --> modules/monitoring/audit/ssh-access.py:1:113 |141 | #!/usr/bin/env python315 | ^^^^^^^^^^^^^^^^^^^^^^162 | from __future__ import annotations17 |1819TRY004 Prefer `TypeError` exception for invalid type20 --> modules/monitoring/audit/ssh-access.py:121:921 |22119 | end_ip = ip_address(end)23120 | if not isinstance(start_ip, IPv4Address) or not isinstance(end_ip, IPv4Address):24121 | raise ValueError(f"only IPv4 emergency ranges are supported: {raw_range}")25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^26122 | return EmergencyRange(start_ip, end_ip)27 |2829EXE001 Shebang is present but file is not executable30 --> modules/monitoring/audit/tailnet-app-access.py:1:131 |321 | #!/usr/bin/env python333 | ^^^^^^^^^^^^^^^^^^^^^^342 | from __future__ import annotations35 |3637EXE001 Shebang is present but file is not executable38 --> modules/monitoring/exporters/systemd-status.py:1:139 |401 | #!/usr/bin/env python341 | ^^^^^^^^^^^^^^^^^^^^^^422 | import argparse433 | import json44 |4546EXE001 Shebang is present but file is not executable47 --> modules/stalwart/principals/ensure_principals.py:1:148 |491 | #!/usr/bin/env python350 | ^^^^^^^^^^^^^^^^^^^^^^512 | import argparse523 | import base6453 |5455EXE001 Shebang is present but file is not executable56 --> tasks.py:1:157 |581 | #!/usr/bin/env python359 | ^^^^^^^^^^^^^^^^^^^^^^602 |613 | import json62 |6364SIM102 Use a single `if` statement instead of nested `if` statements65 --> tasks.py:73:966 |6772 | for i, line in enumerate(lines):6873 | / if "Syncing keys for file" in line:6974 | | if i + 1 >= len(lines) or "already up to date" not in lines[i + 1]:70 | |_______________________________________________________________________________^7175 | filename = line.split("file ")[-1]7276 | updated_files.append(filename)73 |74help: Combine `if` statements using `and`7576BLE001 Do not catch blind exception: `Exception`77 --> tasks.py:415:1278 |79413 | print(f"Magic packet sent to {host}!")80414 |81415 | except Exception as e:82 | ^^^^^^^^^83416 | print(f"Error: {e}")84417 | if "nixosConfigurations" in str(e):85 |8687PLR1722 Use `sys.exit()` instead of `exit`88 --> tasks.py:525:989 |90523 | if keys["machines"].get(hostname, None):91524 | print("Configuration already exists")92525 | exit(-1)93 | ^^^^94526 | keys["machines"][hostname] = ""95527 | with open(f"{ROOT}/pubkeys.json", "w") as f:96 |97help: Replace `exit` with `sys.exit()`9899DTZ005 `datetime.datetime.now()` called without a `tz` argument100 --> tasks.py:620:13101 |102618 | expired = []103619 | expiring = []104620 | today = datetime.now().date()105 | ^^^^^^^^^^^^^^106621 |107622 | # Find all matches108 |109help: Pass a `datetime.timezone` object to the `tz` parameter110111DTZ007 Naive datetime constructed using `datetime.datetime.strptime()` without %z112 --> tasks.py:626:24113 |114624 | username = match.group(1)115625 | expires_str = match.group(2)116626 | expires_date = datetime.strptime(expires_str, "%Y-%m-%d").date()117 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^118627 |119628 | # Skip if this is inside a comment120 |121help: Call `.replace(tzinfo=<timezone>)` or `.astimezone()` to convert to an aware datetime122123Found 19 errors (7 fixed, 12 remaining).124No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).125126traversed 377 files127emitted 342 files for processing128formatted 334 files (4 changed) in 859ms129Error: failed to finalise formatting: formatting failures detected