these 2 derivations will be built: /nix/store/ajfwnrv5p32j45fvnnqd45zlpd3040j0-treefmt.drv /nix/store/hk560yf4m9bkfvljh6sajfzcvnlh0imi-treefmt-check.drv these 42 paths will be fetched (0.0 KiB download, 208.6 MiB unpacked): /nix/store/adrkcplbsaxnvj2w751xsvzhm4cfar8g-ada-4.0.0 /nix/store/gm11h422jsfx7s8nn0379n4n1sm9zv2f-brotli-1.2.0 /nix/store/lbw2240l13z6jqpwp6bk3aixd501fz69-brotli-1.2.0-dev /nix/store/5bqhcaczahrrbczlr1n5lgvz8rcv2ghd-c-ares-1.34.8 /nix/store/zylcp0lagk15lxhq4lvkxpyccnif4w55-deadnix-1.3.2 /nix/store/21gfk1y0dfarab2y1l80hjg5540mxszi-flake-edit-0.3.6 /nix/store/j61gjn7l3179rzjxwd6rpcjh5scfzdjg-flake-edit.toml /nix/store/h5dhbjm8kw8yqqkr38gxbrv0lldby4ww-git-lfs-3.7.1 /nix/store/kpk1qrs2z8f5py20w03p0s7nvyhbvngm-gtest-1.18.0-dev /nix/store/2c3bix9p476qx35vwzk2k2h93wiwf90f-hdrhistogram_c-0.11.10 /nix/store/lin4flm874f0i87xxpi81crvcxqbrff7-jemalloc-5.3.1 /nix/store/6mpnq8xc1mj1h67b73v4fghra1bj5a5i-libev-4.33 /nix/store/gp66wsz3riai0n65cdyi5m0y35gh6fq8-libuv-1.52.1-dev /nix/store/hzy8s88g3acmxy430dj9lybkf444k9w1-llhttp-9.4.3-dev /nix/store/bkz5n3msppz1awhhbiin31k7c0bsbf9g-merve-1.2.2 /nix/store/33qw58z7kdlniv51g75a4sr9m15kk2jx-nbytes-0.1.4 /nix/store/535wblsj3cmv5p2xq720mi6c9gpj9h5p-nghttp2-1.70.0 /nix/store/yda4b60ylx3chqg1pnk1508cj4q3mh42-nghttp2-1.70.0-dev /nix/store/pbplyb609ih8wijia5qba5cd29wryb20-nghttp3-1.16.0-dev /nix/store/wpivvwwr6dhi0fg4jkz1crzjk9dvvkg6-ngtcp2-1.23.0-dev /nix/store/12m0bg0bpjgyrakhnbfznd1dwmap0i9b-nixfmt-1.5.0 /nix/store/hnizp3p9k7gix8iqlip1pai9fy417ygy-nodejs-24.20.0 /nix/store/29zcshmp5hid6l4ckl2vg9bvnnrdr0sw-nodejs-slim-24.20.0 /nix/store/2p46k13943c43x9fzh4x3i1f4h3i9w34-nodejs-slim-24.20.0-corepack /nix/store/dhi1wkiax2xgf59vxhgmlsgvwmj69312-nodejs-slim-24.20.0-npm /nix/store/ik15agzk82h1sbazhalg11y8zw1xvl8n-openssl-3.6.4-dev /nix/store/s1rg19kjzsg6bhdh77l00lf664nq6470-prettier-3.9.6 /nix/store/1lhvjb161y5878pkf697fyc40r19vv2y-ruff-0.16.8 /nix/store/8s9rf958r3pvf74csyaq15qn97845q98-shellcheck-0.11.0-bin /nix/store/51ygkp6fqm68hy2jrrr2ja2lvk5xqiij-shfmt-3.14.1 /nix/store/4kg2ikzp03l897y89m99ayrrqhq999r9-simdjson-4.6.8 /nix/store/vwhidw8gdqym8pgzrdvsdc18xh9f17bw-simdutf-6.5.0 /nix/store/m37cwyj66cj9w35p43a702dlv6ggyfrk-simdutf-9.1.0 /nix/store/1ag9nx63cvsq8144696shw1yx7xclk6b-sqlite-3.53.3-bin /nix/store/5q261wj3mn5z5q45xjx8yjx8z7ak49vm-sqlite-3.53.3-dev /nix/store/3fsgz4rc90ilykp7hf9261x8az94bnmh-statix-0.5.8-unstable-2026-07-17 /nix/store/k0jb0avwb22y0dxdd4ibggbc1107smz3-statix-config /nix/store/m68h89f92bjmkn1zhl4ij8hwfv9ijm51-statix-fix /nix/store/y66w69lrhxkknzgsba9hy12rfzrkl3hb-treefmt-2.6.0 /nix/store/b02iypf1vkmsgyiglq2hfikc4ahq6r9w-treefmt.toml /nix/store/v97c955w6axf4vafwj0n8yrb31blyz5p-uvwasi-0.0.23 /nix/store/inzvxx780z6lzmg7rnx31mg1fza6jn4i-zstd-1.5.7-dev warning: ignoring the client-specified setting 'store', because it is a restricted setting and you are not a trusted user building '/nix/store/hk560yf4m9bkfvljh6sajfzcvnlh0imi-treefmt-check.drv' on nix-store.geninf.io:50051 treefmt-check> build01: building hk560yf4m9bkfvljh6sajfzcvnlh0imi-treefmt-check.drv treefmt-check> treefmt v2.6.0ERRO formatter | ruff-check: failed to apply with options '[check --fix checks/hermes-desktop-connections/test.py checks/hermes-remote-probe.py checks/hermes-simplex-address-retry/fake_simplex.py checks/spaces-install-secret-dialog/driver.py checks/spaces-integration-approval-vm/actor.py checks/spaces-integration-confirm/driver.py checks/spaces-integration-gateway-e2e/driver.py checks/spaces-integration-proton-tls/gen.py checks/spaces-integration-proton-tls/stub.py checks/spaces-integration-wrapper-shell/stub.py checks/spaces-integrations-app-bridge/driver.py checks/spaces-integrations-app-bridge/fake_broker.py checks/spaces-integrations-app-form/driver.py checks/spaces-integrations-app-form/fake_broker.py checks/spaces-integrations-app-managed/driver.py checks/spaces-integrations-app-managed/fake_broker.py checks/spaces-integrations-app-ndjson-socket/driver.py checks/spaces-integrations-app-overview/driver.py checks/spaces-integrations-app-overview/fake_broker.py checks/spaces-integrations-app-setup/driver.py checks/spaces-integrations-app-setup/fake_broker.py checks/spaces-nixos-apply-vm/actor.py checks/spaces-voice-indicator-bar-geometry/driver.py checks/spaces-voice-indicator-plugin-state/driver.py checks/spaces-voice-indicator-state/test_states.py checks/spaces-voice-indicator-warning/driver.py lib/qmllint-gen-qmldir.py lib/qmllint-patch-qmltypes.py lib/qs_broker.py lib/qs_harness.py lib/qs_integrations.py lib/spaces_install_lib.py modules/nixos/hermes/desktop-connections.py modules/nixos/hermes/nix-store-binds.py modules/nixos/hermes/simplex-address.py packages/agent-vm/qmp.py packages/docs-render/docs_render.py packages/docs-render/test_render.py packages/integration-caldav/integration_caldav.py packages/integration-caldav/test_integration_caldav.py packages/integration-contacts/integration_contacts.py packages/integration-contacts/test_integration_contacts.py packages/integration-github/integration_github.py packages/integration-github/test_integration_github.py packages/integration-location/integration_location.py packages/integration-location/test_integration_location.py packages/integration-mail/integration_mail.py packages/integration-mail/test_integration_mail.py packages/integration-nixos/integration_nixos.py packages/integration-nixos/test_integration_nixos.py packages/integration-offline-wiki/integration_offline_wiki.py packages/integration-offline-wiki/test_integration_offline_wiki.py packages/integration-proton/conftest.py packages/integration-proton/integration_proton.py packages/integration-proton/integration_proton_setup.py packages/integration-proton/test_integration_proton.py packages/integration-proton/test_integration_proton_setup.py packages/integration-signal/integration_signal.py packages/integration-signal/integration_signal_setup.py packages/integration-signal/test_integration_signal.py packages/integration-signal/test_integration_signal_setup.py packages/osm-cli/osm_cli.py packages/osm-cli/test_osm_cli.py packages/signal-cli/spaces_signal/__init__.py packages/signal-cli/spaces_signal/bridge.py packages/signal-cli/spaces_signal/db.py packages/signal-cli/spaces_signal/jsonrpc.py packages/signal-cli/test_bridge.py packages/signal-cli/test_db.py packages/simplex-phone/phone.py packages/skill-config/skill_config.py packages/skill-config/skill_store.py packages/skill-config/test_skill_config.py packages/skill-config/test_skill_config_api.py packages/skill-config/test_skill_store.py packages/spaces-himalaya-core/spaces_himalaya_core.py packages/spaces-himalaya-core/test_himalaya_core.py packages/spaces-install-backend/backend.py packages/spaces-install-backend/test_backend.py packages/spaces-install-console/test_vt_palette.py packages/spaces-install-console/vt_palette.py packages/spaces-installer-session/bootstrap.py packages/spaces-installer-session/test_bootstrap.py packages/spaces-integration-mcp/spaces_integration_mcp.py packages/spaces-integration-mcp/test_scaffold.py packages/spaces-restore/conftest.py packages/spaces-restore/spaces_restore/__init__.py packages/spaces-restore/spaces_restore/cli.py packages/spaces-restore/spaces_restore/config.py packages/spaces-restore/spaces_restore/crypto.py packages/spaces-restore/spaces_restore/discovery.py packages/spaces-restore/spaces_restore/manifest.py packages/spaces-restore/spaces_restore/nostr.py packages/spaces-restore/spaces_restore/record.py packages/spaces-restore/spaces_restore/secp.py packages/spaces-restore/spaces_restore/transport.py packages/spaces-restore/test_config.py packages/spaces-restore/test_crypto.py packages/spaces-restore/test_discovery.py packages/spaces-restore/test_generate.py packages/spaces-restore/test_keys.py packages/spaces-restore/test_manifest.py packages/spaces-restore/test_nostr.py packages/spaces-restore/test_nostr_integration.py packages/spaces-restore/test_record.py packages/spaces-restore/test_secp.py packages/spaces-restore/test_transport.py packages/spaces-voice-indicator/spaces_voice_indicator/indicator.py packages/spaces-voice-indicator/spaces_voice_indicator/states.py packages/voxtype-tuner/tests/conftest.py packages/voxtype-tuner/tests/test_app.py packages/voxtype-tuner/tests/test_apply.py packages/voxtype-tuner/tests/test_build_argv.py packages/voxtype-tuner/tests/test_defaults.py packages/voxtype-tuner/tests/test_devices.py packages/voxtype-tuner/tests/test_lifecycle.py packages/voxtype-tuner/tests/test_meter.py packages/voxtype-tuner/tests/test_metrics.py packages/voxtype-tuner/tests/test_models.py packages/voxtype-tuner/tests/test_player.py packages/voxtype-tuner/tests/test_recorder.py packages/voxtype-tuner/tests/test_slots.py packages/voxtype-tuner/tests/test_stderr_guard.py packages/voxtype-tuner/tests/test_streaming.py packages/voxtype-tuner/tests/test_tooltips.py packages/voxtype-tuner/tests/test_transcribe.py packages/voxtype-tuner/tests/test_waveform.py packages/voxtype-tuner/tests/test_wiring.py packages/voxtype-tuner/voxtype_tuner/__init__.py packages/voxtype-tuner/voxtype_tuner/app.py packages/voxtype-tuner/voxtype_tuner/apply.py packages/voxtype-tuner/voxtype_tuner/clipboard.py packages/voxtype-tuner/voxtype_tuner/defaults.py packages/voxtype-tuner/voxtype_tuner/devices.py packages/voxtype-tuner/voxtype_tuner/lifecycle.py packages/voxtype-tuner/voxtype_tuner/meter.py packages/voxtype-tuner/voxtype_tuner/metrics.py packages/voxtype-tuner/voxtype_tuner/models.py packages/voxtype-tuner/voxtype_tuner/params.py packages/voxtype-tuner/voxtype_tuner/player.py packages/voxtype-tuner/voxtype_tuner/recorder.py packages/voxtype-tuner/voxtype_tuner/slots.py packages/voxtype-tuner/voxtype_tuner/stderr_guard.py packages/voxtype-tuner/voxtype_tuner/streaming.py packages/voxtype-tuner/voxtype_tuner/transcribe.py packages/voxtype-tuner/voxtype_tuner/waveform.py packages/voxtype-tuner/voxtype_tuner/wiring.py packages/wikidata-cli/test_wikidata_cli.py packages/wikidata-cli/wikidata_cli.py packages/wikipedia-cli/test_wikipedia_cli.py packages/wikipedia-cli/wikipedia_cli.py]': exit status 1 treefmt-check> treefmt-check> S107 Possible hardcoded password assigned to function default: "token" treefmt-check> --> checks/hermes-desktop-connections/test.py:21:30 treefmt-check> | treefmt-check> 21 | def run(script, *args, token="tok-1"): treefmt-check> | ^^^^^^^ treefmt-check> 22 | return subprocess.run( treefmt-check> 23 | [script, "--url", URL, *args], treefmt-check> | treefmt-check> treefmt-check> SIM112 Use capitalized environment variable `WITHREMOTES` instead of `withRemotes` treefmt-check> --> checks/hermes-desktop-connections/test.py:49:27 treefmt-check> | treefmt-check> 49 | with_remotes = os.environ["withRemotes"] treefmt-check> | ^^^^^^^^^^^^^ treefmt-check> 50 | office_only = os.environ["officeOnly"] treefmt-check> 51 | enforcing = os.environ["enforcing"] treefmt-check> | treefmt-check> help: Replace `withRemotes` with `WITHREMOTES` treefmt-check> treefmt-check> SIM112 Use capitalized environment variable `OFFICEONLY` instead of `officeOnly` treefmt-check> --> checks/hermes-desktop-connections/test.py:50:26 treefmt-check> | treefmt-check> 49 | with_remotes = os.environ["withRemotes"] treefmt-check> 50 | office_only = os.environ["officeOnly"] treefmt-check> | ^^^^^^^^^^^^ treefmt-check> 51 | enforcing = os.environ["enforcing"] treefmt-check> | treefmt-check> help: Replace `officeOnly` with `OFFICEONLY` treefmt-check> treefmt-check> SIM112 Use capitalized environment variable `ENFORCING` instead of `enforcing` treefmt-check> --> checks/hermes-desktop-connections/test.py:51:24 treefmt-check> | treefmt-check> 49 | with_remotes = os.environ["withRemotes"] treefmt-check> 50 | office_only = os.environ["officeOnly"] treefmt-check> 51 | enforcing = os.environ["enforcing"] treefmt-check> | ^^^^^^^^^^^ treefmt-check> 52 | treefmt-check> 53 | # Fresh render. treefmt-check> | treefmt-check> help: Replace `enforcing` with `ENFORCING` treefmt-check> treefmt-check> S106 Possible hardcoded password assigned to argument: "token" treefmt-check> --> checks/hermes-desktop-connections/test.py:108:18 treefmt-check> | treefmt-check> 107 | # A token change reaches both files on the next launch. treefmt-check> 108 | run(office_only, token="tok-2") treefmt-check> | ^^^^^^^^^^^^^ treefmt-check> 109 | check(load(CONNECTION)["remote"]["token"]["value"] == "tok-2", "connection.json follows the token") treefmt-check> 110 | check(load(REGISTRY)["connections"][1]["token"]["value"] == "tok-2", "registry follows the token") treefmt-check> | treefmt-check> treefmt-check> S106 Possible hardcoded password assigned to argument: "token" treefmt-check> --> checks/hermes-desktop-connections/test.py:114:22 treefmt-check> | treefmt-check> 112 | # connection.json saved in the app stays, and the launcher says so. treefmt-check> 113 | CONNECTION.write_text(json.dumps({"mode": "local", "profiles": {}})) treefmt-check> 114 | r = run(office_only, token="tok-2") treefmt-check> | ^^^^^^^^^^^^^ treefmt-check> 115 | check(load(CONNECTION)["mode"] == "local", "user gateway left alone") treefmt-check> 116 | check(str(CONNECTION) in r.stderr and "--reset-connections" in r.stderr, f"stderr names the file: {r.stderr!r}") treefmt-check> | treefmt-check> treefmt-check> S106 Possible hardcoded password assigned to argument: "token" treefmt-check> --> checks/hermes-desktop-connections/test.py:120:29 treefmt-check> | treefmt-check> 119 | # --reset restores it; the user's registry entry survives the reset. treefmt-check> 120 | run(office_only, "--reset", token="tok-2") treefmt-check> | ^^^^^^^^^^^^^ treefmt-check> 121 | check(load(CONNECTION)["mode"] == "remote", "reset restores the managed gateway") treefmt-check> 122 | check("mine" in ids(load(REGISTRY)), "user entry survives reset") treefmt-check> | treefmt-check> treefmt-check> S106 Possible hardcoded password assigned to argument: "token" treefmt-check> --> checks/hermes-desktop-connections/test.py:126:20 treefmt-check> | treefmt-check> 124 | # enforcePrimary overwrites a user gateway without a reset. treefmt-check> 125 | CONNECTION.write_text(json.dumps({"mode": "local", "profiles": {}})) treefmt-check> 126 | r = run(enforcing, token="tok-2") treefmt-check> | ^^^^^^^^^^^^^ treefmt-check> 127 | check(load(CONNECTION)["remote"]["url"] == URL and r.stderr == "", "enforcePrimary overwrites") treefmt-check> | treefmt-check> treefmt-check> S106 Possible hardcoded password assigned to argument: "token" treefmt-check> --> checks/hermes-desktop-connections/test.py:132:18 treefmt-check> | treefmt-check> 130 | SIDECAR.unlink() treefmt-check> 131 | CONNECTION.write_text(json.dumps({"mode": "local", "profiles": {}})) treefmt-check> 132 | run(office_only, token="tok-2") treefmt-check> | ^^^^^^^^^^^^^ treefmt-check> 133 | check(load(CONNECTION)["mode"] == "remote", "first adoption takes over a stray connection.json") treefmt-check> | treefmt-check> treefmt-check> S106 Possible hardcoded password assigned to argument: "token" treefmt-check> --> checks/hermes-desktop-connections/test.py:140:18 treefmt-check> | treefmt-check> 138 | REGISTRY.unlink() treefmt-check> 139 | REGISTRY.symlink_to(target) treefmt-check> 140 | run(office_only, token="tok-2") treefmt-check> | ^^^^^^^^^^^^^ treefmt-check> 141 | check(not REGISTRY.is_symlink() and REGISTRY.is_file() and mode(REGISTRY) == 0o600, "symlink replaced by a regular file") treefmt-check> 142 | check(load(target)["connections"] == [], "symlink target untouched") treefmt-check> | treefmt-check> treefmt-check> S106 Possible hardcoded password assigned to argument: "token" treefmt-check> --> checks/hermes-desktop-connections/test.py:146:18 treefmt-check> | treefmt-check> 144 | # Garbage in the registry is not fatal. treefmt-check> 145 | REGISTRY.write_text("{not json") treefmt-check> 146 | run(office_only, token="tok-2") treefmt-check> | ^^^^^^^^^^^^^ treefmt-check> 147 | check(ids(load(REGISTRY)) == ["local", "nix-this-machine", "nix-office"], "unparsable registry is rebuilt") treefmt-check> | treefmt-check> treefmt-check> ANN201 Missing return type annotation for public function `warn` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:48:5 treefmt-check> | treefmt-check> 48 | def warn(msg): treefmt-check> | ^^^^ treefmt-check> 49 | print(f"hermes-desktop-connections: {msg}", file=sys.stderr) treefmt-check> | treefmt-check> help: Add return type annotation: `None` treefmt-check> treefmt-check> ANN001 Missing type annotation for function argument `msg` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:48:10 treefmt-check> | treefmt-check> 48 | def warn(msg): treefmt-check> | ^^^ treefmt-check> 49 | print(f"hermes-desktop-connections: {msg}", file=sys.stderr) treefmt-check> | treefmt-check> treefmt-check> ANN201 Missing return type annotation for public function `load_json` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:52:5 treefmt-check> | treefmt-check> 52 | def load_json(path): treefmt-check> | ^^^^^^^^^ treefmt-check> 53 | try: treefmt-check> 54 | with open(path, encoding="utf-8") as f: treefmt-check> | treefmt-check> help: Add return type annotation treefmt-check> treefmt-check> ANN001 Missing type annotation for function argument `path` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:52:15 treefmt-check> | treefmt-check> 52 | def load_json(path): treefmt-check> | ^^^^ treefmt-check> 53 | try: treefmt-check> 54 | with open(path, encoding="utf-8") as f: treefmt-check> | treefmt-check> treefmt-check> PTH123 `open()` should be replaced by `Path.open()` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:54:14 treefmt-check> | treefmt-check> 52 | def load_json(path): treefmt-check> 53 | try: treefmt-check> 54 | with open(path, encoding="utf-8") as f: treefmt-check> | ^^^^ treefmt-check> 55 | return json.load(f) treefmt-check> 56 | except (OSError, ValueError): treefmt-check> | treefmt-check> help: Replace with `Path.open()` treefmt-check> treefmt-check> ANN201 Missing return type annotation for public function `read_bytes` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:60:5 treefmt-check> | treefmt-check> 60 | def read_bytes(path): treefmt-check> | ^^^^^^^^^^ treefmt-check> 61 | try: treefmt-check> 62 | with open(path, "rb") as f: treefmt-check> | treefmt-check> help: Add return type annotation treefmt-check> treefmt-check> ANN001 Missing type annotation for function argument `path` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:60:16 treefmt-check> | treefmt-check> 60 | def read_bytes(path): treefmt-check> | ^^^^ treefmt-check> 61 | try: treefmt-check> 62 | with open(path, "rb") as f: treefmt-check> | treefmt-check> treefmt-check> PTH123 `open()` should be replaced by `Path.open()` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:62:14 treefmt-check> | treefmt-check> 60 | def read_bytes(path): treefmt-check> 61 | try: treefmt-check> 62 | with open(path, "rb") as f: treefmt-check> | ^^^^ treefmt-check> 63 | return f.read() treefmt-check> 64 | except OSError: treefmt-check> | treefmt-check> help: Replace with `Path.open()` treefmt-check> treefmt-check> ANN201 Missing return type annotation for public function `render` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:68:5 treefmt-check> | treefmt-check> 68 | def render(value): treefmt-check> | ^^^^^^ treefmt-check> 69 | return (json.dumps(value, indent=2) + "\n").encode("utf-8") treefmt-check> | treefmt-check> help: Add return type annotation treefmt-check> treefmt-check> ANN001 Missing type annotation for function argument `value` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:68:12 treefmt-check> | treefmt-check> 68 | def render(value): treefmt-check> | ^^^^^ treefmt-check> 69 | return (json.dumps(value, indent=2) + "\n").encode("utf-8") treefmt-check> | treefmt-check> treefmt-check> ANN201 Missing return type annotation for public function `sha256` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:72:5 treefmt-check> | treefmt-check> 72 | def sha256(data): treefmt-check> | ^^^^^^ treefmt-check> 73 | return hashlib.sha256(data).hexdigest() treefmt-check> | treefmt-check> help: Add return type annotation treefmt-check> treefmt-check> ANN001 Missing type annotation for function argument `data` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:72:12 treefmt-check> | treefmt-check> 72 | def sha256(data): treefmt-check> | ^^^^ treefmt-check> 73 | return hashlib.sha256(data).hexdigest() treefmt-check> | treefmt-check> treefmt-check> ANN201 Missing return type annotation for public function `write_private` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:76:5 treefmt-check> | treefmt-check> 76 | def write_private(path, data): treefmt-check> | ^^^^^^^^^^^^^ treefmt-check> 77 | """Regular file, 0600, replaced atomically. Skips a byte-identical file.""" treefmt-check> 78 | if not os.path.islink(path) and read_bytes(path) == data: treefmt-check> | treefmt-check> help: Add return type annotation: `None` treefmt-check> treefmt-check> ANN001 Missing type annotation for function argument `path` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:76:19 treefmt-check> | treefmt-check> 76 | def write_private(path, data): treefmt-check> | ^^^^ treefmt-check> 77 | """Regular file, 0600, replaced atomically. Skips a byte-identical file.""" treefmt-check> 78 | if not os.path.islink(path) and read_bytes(path) == data: treefmt-check> | treefmt-check> treefmt-check> ANN001 Missing type annotation for function argument `data` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:76:25 treefmt-check> | treefmt-check> 76 | def write_private(path, data): treefmt-check> | ^^^^ treefmt-check> 77 | """Regular file, 0600, replaced atomically. Skips a byte-identical file.""" treefmt-check> 78 | if not os.path.islink(path) and read_bytes(path) == data: treefmt-check> | treefmt-check> treefmt-check> PTH114 `os.path.islink()` should be replaced by `Path.is_symlink()` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:78:12 treefmt-check> | treefmt-check> 76 | def write_private(path, data): treefmt-check> 77 | """Regular file, 0600, replaced atomically. Skips a byte-identical file.""" treefmt-check> 78 | if not os.path.islink(path) and read_bytes(path) == data: treefmt-check> | ^^^^^^^^^^^^^^ treefmt-check> 79 | return treefmt-check> 80 | directory = os.path.dirname(path) treefmt-check> | treefmt-check> help: Replace with `Path(...).is_symlink()` treefmt-check> treefmt-check> PTH120 `os.path.dirname()` should be replaced by `Path.parent` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:80:17 treefmt-check> | treefmt-check> 78 | if not os.path.islink(path) and read_bytes(path) == data: treefmt-check> 79 | return treefmt-check> 80 | directory = os.path.dirname(path) treefmt-check> | ^^^^^^^^^^^^^^^ treefmt-check> 81 | os.makedirs(directory, mode=0o700, exist_ok=True) treefmt-check> 82 | if os.path.islink(path): treefmt-check> | treefmt-check> help: Replace with `Path(...).parent` treefmt-check> treefmt-check> PTH103 `os.makedirs()` should be replaced by `Path.mkdir(parents=True)` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:81:5 treefmt-check> | treefmt-check> 79 | return treefmt-check> 80 | directory = os.path.dirname(path) treefmt-check> 81 | os.makedirs(directory, mode=0o700, exist_ok=True) treefmt-check> | ^^^^^^^^^^^ treefmt-check> 82 | if os.path.islink(path): treefmt-check> 83 | os.unlink(path) treefmt-check> | treefmt-check> help: Replace with `Path(...).mkdir(parents=True)` treefmt-check> treefmt-check> PTH114 `os.path.islink()` should be replaced by `Path.is_symlink()` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:82:8 treefmt-check> | treefmt-check> 80 | directory = os.path.dirname(path) treefmt-check> 81 | os.makedirs(directory, mode=0o700, exist_ok=True) treefmt-check> 82 | if os.path.islink(path): treefmt-check> | ^^^^^^^^^^^^^^ treefmt-check> 83 | os.unlink(path) treefmt-check> 84 | fd, tmp = tempfile.mkstemp(dir=directory, prefix=".", suffix=".tmp") treefmt-check> | treefmt-check> help: Replace with `Path(...).is_symlink()` treefmt-check> treefmt-check> PTH108 `os.unlink()` should be replaced by `Path.unlink()` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:83:9 treefmt-check> | treefmt-check> 81 | os.makedirs(directory, mode=0o700, exist_ok=True) treefmt-check> 82 | if os.path.islink(path): treefmt-check> 83 | os.unlink(path) treefmt-check> | ^^^^^^^^^ treefmt-check> 84 | fd, tmp = tempfile.mkstemp(dir=directory, prefix=".", suffix=".tmp") treefmt-check> 85 | try: treefmt-check> | treefmt-check> help: Replace with `Path(...).unlink()` treefmt-check> treefmt-check> PTH101 `os.chmod()` should be replaced by `Path.chmod()` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:88:9 treefmt-check> | treefmt-check> 86 | with os.fdopen(fd, "wb") as f: treefmt-check> 87 | f.write(data) treefmt-check> 88 | os.chmod(tmp, 0o600) treefmt-check> | ^^^^^^^^ treefmt-check> 89 | os.replace(tmp, path) treefmt-check> 90 | except BaseException: treefmt-check> | treefmt-check> help: Replace with `Path(...).chmod(...)` treefmt-check> treefmt-check> PTH105 `os.replace()` should be replaced by `Path.replace()` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:89:9 treefmt-check> | treefmt-check> 87 | f.write(data) treefmt-check> 88 | os.chmod(tmp, 0o600) treefmt-check> 89 | os.replace(tmp, path) treefmt-check> | ^^^^^^^^^^ treefmt-check> 90 | except BaseException: treefmt-check> 91 | os.unlink(tmp) treefmt-check> | treefmt-check> help: Replace with `Path(...).replace(...)` treefmt-check> treefmt-check> PTH108 `os.unlink()` should be replaced by `Path.unlink()` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:91:9 treefmt-check> | treefmt-check> 89 | os.replace(tmp, path) treefmt-check> 90 | except BaseException: treefmt-check> 91 | os.unlink(tmp) treefmt-check> | ^^^^^^^^^ treefmt-check> 92 | raise treefmt-check> | treefmt-check> help: Replace with `Path(...).unlink()` treefmt-check> treefmt-check> ANN201 Missing return type annotation for public function `remove` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:95:5 treefmt-check> | treefmt-check> 95 | def remove(path): treefmt-check> | ^^^^^^ treefmt-check> 96 | try: treefmt-check> 97 | os.unlink(path) treefmt-check> | treefmt-check> help: Add return type annotation: `None` treefmt-check> treefmt-check> ANN001 Missing type annotation for function argument `path` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:95:12 treefmt-check> | treefmt-check> 95 | def remove(path): treefmt-check> | ^^^^ treefmt-check> 96 | try: treefmt-check> 97 | os.unlink(path) treefmt-check> | treefmt-check> treefmt-check> SIM105 Use `contextlib.suppress(FileNotFoundError)` instead of `try`-`except`-`pass` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:96:5 treefmt-check> | treefmt-check> 95 | def remove(path): treefmt-check> 96 | / try: treefmt-check> 97 | | os.unlink(path) treefmt-check> 98 | | except FileNotFoundError: treefmt-check> 99 | | pass treefmt-check> | |____________^ treefmt-check> help: Replace `try`-`except`-`pass` with `with contextlib.suppress(FileNotFoundError): ...` treefmt-check> treefmt-check> PTH108 `os.unlink()` should be replaced by `Path.unlink()` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:97:9 treefmt-check> | treefmt-check> 95 | def remove(path): treefmt-check> 96 | try: treefmt-check> 97 | os.unlink(path) treefmt-check> | ^^^^^^^^^ treefmt-check> 98 | except FileNotFoundError: treefmt-check> 99 | pass treefmt-check> | treefmt-check> help: Replace with `Path(...).unlink()` treefmt-check> treefmt-check> ANN201 Missing return type annotation for public function `plain_token` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:102:5 treefmt-check> | treefmt-check> 102 | def plain_token(value): treefmt-check> | ^^^^^^^^^^^ treefmt-check> 103 | return {"encoding": "plain", "value": value} treefmt-check> | treefmt-check> help: Add return type annotation treefmt-check> treefmt-check> ANN001 Missing type annotation for function argument `value` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:102:17 treefmt-check> | treefmt-check> 102 | def plain_token(value): treefmt-check> | ^^^^^ treefmt-check> 103 | return {"encoding": "plain", "value": value} treefmt-check> | treefmt-check> treefmt-check> ANN201 Missing return type annotation for public function `managed_entries` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:106:5 treefmt-check> | treefmt-check> 106 | def managed_entries(spec, url, token): treefmt-check> | ^^^^^^^^^^^^^^^ treefmt-check> 107 | entries = [ treefmt-check> 108 | dict(LOCAL_ENTRY), treefmt-check> | treefmt-check> help: Add return type annotation treefmt-check> treefmt-check> ANN001 Missing type annotation for function argument `spec` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:106:21 treefmt-check> | treefmt-check> 106 | def managed_entries(spec, url, token): treefmt-check> | ^^^^ treefmt-check> 107 | entries = [ treefmt-check> 108 | dict(LOCAL_ENTRY), treefmt-check> | treefmt-check> treefmt-check> ANN001 Missing type annotation for function argument `url` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:106:27 treefmt-check> | treefmt-check> 106 | def managed_entries(spec, url, token): treefmt-check> | ^^^ treefmt-check> 107 | entries = [ treefmt-check> 108 | dict(LOCAL_ENTRY), treefmt-check> | treefmt-check> treefmt-check> ANN001 Missing type annotation for function argument `token` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:106:32 treefmt-check> | treefmt-check> 106 | def managed_entries(spec, url, token): treefmt-check> | ^^^^^ treefmt-check> 107 | entries = [ treefmt-check> 108 | dict(LOCAL_ENTRY), treefmt-check> | treefmt-check> treefmt-check> PTH123 `open()` should be replaced by `Path.open()` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:128:26 treefmt-check> | treefmt-check> 126 | token_file = remote["tokenFile"] treefmt-check> 127 | try: treefmt-check> 128 | with open(token_file, encoding="utf-8") as f: treefmt-check> | ^^^^ treefmt-check> 129 | value = f.read().strip() treefmt-check> 130 | except OSError as e: treefmt-check> | treefmt-check> help: Replace with `Path.open()` treefmt-check> treefmt-check> ANN201 Missing return type annotation for public function `merge_registry` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:138:5 treefmt-check> | treefmt-check> 138 | def merge_registry(existing, managed, stale_ids): treefmt-check> | ^^^^^^^^^^^^^^ treefmt-check> 139 | if not isinstance(existing, dict) or existing.get("version") != 2: treefmt-check> 140 | existing = {} treefmt-check> | treefmt-check> help: Add return type annotation treefmt-check> treefmt-check> ANN001 Missing type annotation for function argument `existing` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:138:20 treefmt-check> | treefmt-check> 138 | def merge_registry(existing, managed, stale_ids): treefmt-check> | ^^^^^^^^ treefmt-check> 139 | if not isinstance(existing, dict) or existing.get("version") != 2: treefmt-check> 140 | existing = {} treefmt-check> | treefmt-check> treefmt-check> ANN001 Missing type annotation for function argument `managed` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:138:30 treefmt-check> | treefmt-check> 138 | def merge_registry(existing, managed, stale_ids): treefmt-check> | ^^^^^^^ treefmt-check> 139 | if not isinstance(existing, dict) or existing.get("version") != 2: treefmt-check> 140 | existing = {} treefmt-check> | treefmt-check> treefmt-check> ANN001 Missing type annotation for function argument `stale_ids` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:138:39 treefmt-check> | treefmt-check> 138 | def merge_registry(existing, managed, stale_ids): treefmt-check> | ^^^^^^^^^ treefmt-check> 139 | if not isinstance(existing, dict) or existing.get("version") != 2: treefmt-check> 140 | existing = {} treefmt-check> | treefmt-check> treefmt-check> PLR2004 Magic value used in comparison, consider replacing `2` with a constant variable treefmt-check> --> modules/nixos/hermes/desktop-connections.py:139:69 treefmt-check> | treefmt-check> 138 | def merge_registry(existing, managed, stale_ids): treefmt-check> 139 | if not isinstance(existing, dict) or existing.get("version") != 2: treefmt-check> | ^ treefmt-check> 140 | existing = {} treefmt-check> 141 | old = existing.get("connections") treefmt-check> | treefmt-check> treefmt-check> ANN201 Missing return type annotation for public function `main` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:163:5 treefmt-check> | treefmt-check> 163 | def main(): treefmt-check> | ^^^^ treefmt-check> 164 | parser = argparse.ArgumentParser() treefmt-check> 165 | parser.add_argument("--spec", required=True) treefmt-check> | treefmt-check> help: Add return type annotation: `int` treefmt-check> treefmt-check> PTH123 `open()` should be replaced by `Path.open()` treefmt-check> --> modules/nixos/hermes/desktop-connections.py:170:10 treefmt-check> | treefmt-check> 168 | args = parser.parse_args() treefmt-check> 169 | treefmt-check> 170 | with open(args.spec, encoding="utf-8") as f: treefmt-check> | ^^^^ treefmt-check> 171 | spec = json.load(f) treefmt-check> 172 | token = sys.stdin.read().strip() treefmt-check> | treefmt-check> help: Replace with `Path.open()` treefmt-check> treefmt-check> PTH118 `os.path.join()` should be replaced by `Path` with `/` operator treefmt-check> --> modules/nixos/hermes/desktop-connections.py:177:56 treefmt-check> | treefmt-check> 175 | return 1 treefmt-check> 176 | treefmt-check> 177 | config_home = os.environ.get("XDG_CONFIG_HOME") or os.path.join(os.environ["HOME"], ".config") treefmt-check> | ^^^^^^^^^^^^ treefmt-check> 178 | hermes_dir = os.path.join(config_home, "Hermes") treefmt-check> 179 | registry_path = os.path.join(hermes_dir, "connections.json") treefmt-check> | treefmt-check> treefmt-check> PTH118 `os.path.join()` should be replaced by `Path` with `/` operator treefmt-check> --> modules/nixos/hermes/desktop-connections.py:178:18 treefmt-check> | treefmt-check> 177 | config_home = os.environ.get("XDG_CONFIG_HOME") or os.path.join(os.environ["HOME"], ".config") treefmt-check> 178 | hermes_dir = os.path.join(config_home, "Hermes") treefmt-check> | ^^^^^^^^^^^^ treefmt-check> 179 | registry_path = os.path.join(hermes_dir, "connections.json") treefmt-check> 180 | connection_path = os.path.join(hermes_dir, "connection.json") treefmt-check> | treefmt-check> treefmt-check> PTH118 `os.path.join()` should be replaced by `Path` with `/` operator treefmt-check> --> modules/nixos/hermes/desktop-connections.py:179:21 treefmt-check> | treefmt-check> 177 | config_home = os.environ.get("XDG_CONFIG_HOME") or os.path.join(os.environ["HOME"], ".config") treefmt-check> 178 | hermes_dir = os.path.join(config_home, "Hermes") treefmt-check> 179 | registry_path = os.path.join(hermes_dir, "connections.json") treefmt-check> | ^^^^^^^^^^^^ treefmt-check> 180 | connection_path = os.path.join(hermes_dir, "connection.json") treefmt-check> 181 | sidecar_path = os.path.join(hermes_dir, "nix-managed-connections.json") treefmt-check> | treefmt-check> treefmt-check> PTH118 `os.path.join()` should be replaced by `Path` with `/` operator treefmt-check> --> modules/nixos/hermes/desktop-connections.py:180:23 treefmt-check> | treefmt-check> 178 | hermes_dir = os.path.join(config_home, "Hermes") treefmt-check> 179 | registry_path = os.path.join(hermes_dir, "connections.json") treefmt-check> 180 | connection_path = os.path.join(hermes_dir, "connection.json") treefmt-check> | ^^^^^^^^^^^^ treefmt-check> 181 | sidecar_path = os.path.join(hermes_dir, "nix-managed-connections.json") treefmt-check> | treefmt-check> treefmt-check> PTH118 `os.path.join()` should be replaced by `Path` with `/` operator treefmt-check> --> modules/nixos/hermes/desktop-connections.py:181:20 treefmt-check> | treefmt-check> 179 | registry_path = os.path.join(hermes_dir, "connections.json") treefmt-check> 180 | connection_path = os.path.join(hermes_dir, "connection.json") treefmt-check> 181 | sidecar_path = os.path.join(hermes_dir, "nix-managed-connections.json") treefmt-check> | ^^^^^^^^^^^^ treefmt-check> 182 | treefmt-check> 183 | if args.reset: treefmt-check> | treefmt-check> treefmt-check> Found 57 errors. treefmt-check> No fixes available (8 hidden fixes can be enabled with the `--unsafe-fixes` option). treefmt-check> treefmt-check> traversed 612 files treefmt-check> emitted 399 files for processing treefmt-check> formatted 248 files (7 changed) in 2.111s treefmt-check> Error: failed to finalise formatting: formatting failures detected error: Cannot build '/nix/store/hk560yf4m9bkfvljh6sajfzcvnlh0imi-treefmt-check.drv'. Reason: builder failed with exit code 1. Output paths: /nix/store/x67asl6qvrlvzvw17zv4xqaf3p469y2y-treefmt-check Last 25 log lines: > 178 | hermes_dir = os.path.join(config_home, "Hermes") > 179 | registry_path = os.path.join(hermes_dir, "connections.json") > 180 | connection_path = os.path.join(hermes_dir, "connection.json") > | ^^^^^^^^^^^^ > 181 | sidecar_path = os.path.join(hermes_dir, "nix-managed-connections.json") > | > > PTH118 `os.path.join()` should be replaced by `Path` with `/` operator > --> modules/nixos/hermes/desktop-connections.py:181:20 > | > 179 | registry_path = os.path.join(hermes_dir, "connections.json") > 180 | connection_path = os.path.join(hermes_dir, "connection.json") > 181 | sidecar_path = os.path.join(hermes_dir, "nix-managed-connections.json") > | ^^^^^^^^^^^^ > 182 | > 183 | if args.reset: > | > > Found 57 errors. > No fixes available (8 hidden fixes can be enabled with the `--unsafe-fixes` option). > > traversed 612 files > emitted 399 files for processing > formatted 248 files (7 changed) in 2.111s > Error: failed to finalise formatting: formatting failures detected For full logs, run: nix log /nix/store/hk560yf4m9bkfvljh6sajfzcvnlh0imi-treefmt-check.drv