build01: building hk560yf4m9bkfvljh6sajfzcvnlh0imi-treefmt-check.drv 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 S107 Possible hardcoded password assigned to function default: "token" --> checks/hermes-desktop-connections/test.py:21:30 | 21 | def run(script, *args, token="tok-1"): | ^^^^^^^ 22 | return subprocess.run( 23 | [script, "--url", URL, *args], | SIM112 Use capitalized environment variable `WITHREMOTES` instead of `withRemotes` --> checks/hermes-desktop-connections/test.py:49:27 | 49 | with_remotes = os.environ["withRemotes"] | ^^^^^^^^^^^^^ 50 | office_only = os.environ["officeOnly"] 51 | enforcing = os.environ["enforcing"] | help: Replace `withRemotes` with `WITHREMOTES` SIM112 Use capitalized environment variable `OFFICEONLY` instead of `officeOnly` --> checks/hermes-desktop-connections/test.py:50:26 | 49 | with_remotes = os.environ["withRemotes"] 50 | office_only = os.environ["officeOnly"] | ^^^^^^^^^^^^ 51 | enforcing = os.environ["enforcing"] | help: Replace `officeOnly` with `OFFICEONLY` SIM112 Use capitalized environment variable `ENFORCING` instead of `enforcing` --> checks/hermes-desktop-connections/test.py:51:24 | 49 | with_remotes = os.environ["withRemotes"] 50 | office_only = os.environ["officeOnly"] 51 | enforcing = os.environ["enforcing"] | ^^^^^^^^^^^ 52 | 53 | # Fresh render. | help: Replace `enforcing` with `ENFORCING` S106 Possible hardcoded password assigned to argument: "token" --> checks/hermes-desktop-connections/test.py:108:18 | 107 | # A token change reaches both files on the next launch. 108 | run(office_only, token="tok-2") | ^^^^^^^^^^^^^ 109 | check(load(CONNECTION)["remote"]["token"]["value"] == "tok-2", "connection.json follows the token") 110 | check(load(REGISTRY)["connections"][1]["token"]["value"] == "tok-2", "registry follows the token") | S106 Possible hardcoded password assigned to argument: "token" --> checks/hermes-desktop-connections/test.py:114:22 | 112 | # connection.json saved in the app stays, and the launcher says so. 113 | CONNECTION.write_text(json.dumps({"mode": "local", "profiles": {}})) 114 | r = run(office_only, token="tok-2") | ^^^^^^^^^^^^^ 115 | check(load(CONNECTION)["mode"] == "local", "user gateway left alone") 116 | check(str(CONNECTION) in r.stderr and "--reset-connections" in r.stderr, f"stderr names the file: {r.stderr!r}") | S106 Possible hardcoded password assigned to argument: "token" --> checks/hermes-desktop-connections/test.py:120:29 | 119 | # --reset restores it; the user's registry entry survives the reset. 120 | run(office_only, "--reset", token="tok-2") | ^^^^^^^^^^^^^ 121 | check(load(CONNECTION)["mode"] == "remote", "reset restores the managed gateway") 122 | check("mine" in ids(load(REGISTRY)), "user entry survives reset") | S106 Possible hardcoded password assigned to argument: "token" --> checks/hermes-desktop-connections/test.py:126:20 | 124 | # enforcePrimary overwrites a user gateway without a reset. 125 | CONNECTION.write_text(json.dumps({"mode": "local", "profiles": {}})) 126 | r = run(enforcing, token="tok-2") | ^^^^^^^^^^^^^ 127 | check(load(CONNECTION)["remote"]["url"] == URL and r.stderr == "", "enforcePrimary overwrites") | S106 Possible hardcoded password assigned to argument: "token" --> checks/hermes-desktop-connections/test.py:132:18 | 130 | SIDECAR.unlink() 131 | CONNECTION.write_text(json.dumps({"mode": "local", "profiles": {}})) 132 | run(office_only, token="tok-2") | ^^^^^^^^^^^^^ 133 | check(load(CONNECTION)["mode"] == "remote", "first adoption takes over a stray connection.json") | S106 Possible hardcoded password assigned to argument: "token" --> checks/hermes-desktop-connections/test.py:140:18 | 138 | REGISTRY.unlink() 139 | REGISTRY.symlink_to(target) 140 | run(office_only, token="tok-2") | ^^^^^^^^^^^^^ 141 | check(not REGISTRY.is_symlink() and REGISTRY.is_file() and mode(REGISTRY) == 0o600, "symlink replaced by a regular file") 142 | check(load(target)["connections"] == [], "symlink target untouched") | S106 Possible hardcoded password assigned to argument: "token" --> checks/hermes-desktop-connections/test.py:146:18 | 144 | # Garbage in the registry is not fatal. 145 | REGISTRY.write_text("{not json") 146 | run(office_only, token="tok-2") | ^^^^^^^^^^^^^ 147 | check(ids(load(REGISTRY)) == ["local", "nix-this-machine", "nix-office"], "unparsable registry is rebuilt") | ANN201 Missing return type annotation for public function `warn` --> modules/nixos/hermes/desktop-connections.py:48:5 | 48 | def warn(msg): | ^^^^ 49 | print(f"hermes-desktop-connections: {msg}", file=sys.stderr) | help: Add return type annotation: `None` ANN001 Missing type annotation for function argument `msg` --> modules/nixos/hermes/desktop-connections.py:48:10 | 48 | def warn(msg): | ^^^ 49 | print(f"hermes-desktop-connections: {msg}", file=sys.stderr) | ANN201 Missing return type annotation for public function `load_json` --> modules/nixos/hermes/desktop-connections.py:52:5 | 52 | def load_json(path): | ^^^^^^^^^ 53 | try: 54 | with open(path, encoding="utf-8") as f: | help: Add return type annotation ANN001 Missing type annotation for function argument `path` --> modules/nixos/hermes/desktop-connections.py:52:15 | 52 | def load_json(path): | ^^^^ 53 | try: 54 | with open(path, encoding="utf-8") as f: | PTH123 `open()` should be replaced by `Path.open()` --> modules/nixos/hermes/desktop-connections.py:54:14 | 52 | def load_json(path): 53 | try: 54 | with open(path, encoding="utf-8") as f: | ^^^^ 55 | return json.load(f) 56 | except (OSError, ValueError): | help: Replace with `Path.open()` ANN201 Missing return type annotation for public function `read_bytes` --> modules/nixos/hermes/desktop-connections.py:60:5 | 60 | def read_bytes(path): | ^^^^^^^^^^ 61 | try: 62 | with open(path, "rb") as f: | help: Add return type annotation ANN001 Missing type annotation for function argument `path` --> modules/nixos/hermes/desktop-connections.py:60:16 | 60 | def read_bytes(path): | ^^^^ 61 | try: 62 | with open(path, "rb") as f: | PTH123 `open()` should be replaced by `Path.open()` --> modules/nixos/hermes/desktop-connections.py:62:14 | 60 | def read_bytes(path): 61 | try: 62 | with open(path, "rb") as f: | ^^^^ 63 | return f.read() 64 | except OSError: | help: Replace with `Path.open()` ANN201 Missing return type annotation for public function `render` --> modules/nixos/hermes/desktop-connections.py:68:5 | 68 | def render(value): | ^^^^^^ 69 | return (json.dumps(value, indent=2) + "\n").encode("utf-8") | help: Add return type annotation ANN001 Missing type annotation for function argument `value` --> modules/nixos/hermes/desktop-connections.py:68:12 | 68 | def render(value): | ^^^^^ 69 | return (json.dumps(value, indent=2) + "\n").encode("utf-8") | ANN201 Missing return type annotation for public function `sha256` --> modules/nixos/hermes/desktop-connections.py:72:5 | 72 | def sha256(data): | ^^^^^^ 73 | return hashlib.sha256(data).hexdigest() | help: Add return type annotation ANN001 Missing type annotation for function argument `data` --> modules/nixos/hermes/desktop-connections.py:72:12 | 72 | def sha256(data): | ^^^^ 73 | return hashlib.sha256(data).hexdigest() | ANN201 Missing return type annotation for public function `write_private` --> modules/nixos/hermes/desktop-connections.py:76:5 | 76 | def write_private(path, data): | ^^^^^^^^^^^^^ 77 | """Regular file, 0600, replaced atomically. Skips a byte-identical file.""" 78 | if not os.path.islink(path) and read_bytes(path) == data: | help: Add return type annotation: `None` ANN001 Missing type annotation for function argument `path` --> modules/nixos/hermes/desktop-connections.py:76:19 | 76 | def write_private(path, data): | ^^^^ 77 | """Regular file, 0600, replaced atomically. Skips a byte-identical file.""" 78 | if not os.path.islink(path) and read_bytes(path) == data: | ANN001 Missing type annotation for function argument `data` --> modules/nixos/hermes/desktop-connections.py:76:25 | 76 | def write_private(path, data): | ^^^^ 77 | """Regular file, 0600, replaced atomically. Skips a byte-identical file.""" 78 | if not os.path.islink(path) and read_bytes(path) == data: | PTH114 `os.path.islink()` should be replaced by `Path.is_symlink()` --> modules/nixos/hermes/desktop-connections.py:78:12 | 76 | def write_private(path, data): 77 | """Regular file, 0600, replaced atomically. Skips a byte-identical file.""" 78 | if not os.path.islink(path) and read_bytes(path) == data: | ^^^^^^^^^^^^^^ 79 | return 80 | directory = os.path.dirname(path) | help: Replace with `Path(...).is_symlink()` PTH120 `os.path.dirname()` should be replaced by `Path.parent` --> modules/nixos/hermes/desktop-connections.py:80:17 | 78 | if not os.path.islink(path) and read_bytes(path) == data: 79 | return 80 | directory = os.path.dirname(path) | ^^^^^^^^^^^^^^^ 81 | os.makedirs(directory, mode=0o700, exist_ok=True) 82 | if os.path.islink(path): | help: Replace with `Path(...).parent` PTH103 `os.makedirs()` should be replaced by `Path.mkdir(parents=True)` --> modules/nixos/hermes/desktop-connections.py:81:5 | 79 | return 80 | directory = os.path.dirname(path) 81 | os.makedirs(directory, mode=0o700, exist_ok=True) | ^^^^^^^^^^^ 82 | if os.path.islink(path): 83 | os.unlink(path) | help: Replace with `Path(...).mkdir(parents=True)` PTH114 `os.path.islink()` should be replaced by `Path.is_symlink()` --> modules/nixos/hermes/desktop-connections.py:82:8 | 80 | directory = os.path.dirname(path) 81 | os.makedirs(directory, mode=0o700, exist_ok=True) 82 | if os.path.islink(path): | ^^^^^^^^^^^^^^ 83 | os.unlink(path) 84 | fd, tmp = tempfile.mkstemp(dir=directory, prefix=".", suffix=".tmp") | help: Replace with `Path(...).is_symlink()` PTH108 `os.unlink()` should be replaced by `Path.unlink()` --> modules/nixos/hermes/desktop-connections.py:83:9 | 81 | os.makedirs(directory, mode=0o700, exist_ok=True) 82 | if os.path.islink(path): 83 | os.unlink(path) | ^^^^^^^^^ 84 | fd, tmp = tempfile.mkstemp(dir=directory, prefix=".", suffix=".tmp") 85 | try: | help: Replace with `Path(...).unlink()` PTH101 `os.chmod()` should be replaced by `Path.chmod()` --> modules/nixos/hermes/desktop-connections.py:88:9 | 86 | with os.fdopen(fd, "wb") as f: 87 | f.write(data) 88 | os.chmod(tmp, 0o600) | ^^^^^^^^ 89 | os.replace(tmp, path) 90 | except BaseException: | help: Replace with `Path(...).chmod(...)` PTH105 `os.replace()` should be replaced by `Path.replace()` --> modules/nixos/hermes/desktop-connections.py:89:9 | 87 | f.write(data) 88 | os.chmod(tmp, 0o600) 89 | os.replace(tmp, path) | ^^^^^^^^^^ 90 | except BaseException: 91 | os.unlink(tmp) | help: Replace with `Path(...).replace(...)` PTH108 `os.unlink()` should be replaced by `Path.unlink()` --> modules/nixos/hermes/desktop-connections.py:91:9 | 89 | os.replace(tmp, path) 90 | except BaseException: 91 | os.unlink(tmp) | ^^^^^^^^^ 92 | raise | help: Replace with `Path(...).unlink()` ANN201 Missing return type annotation for public function `remove` --> modules/nixos/hermes/desktop-connections.py:95:5 | 95 | def remove(path): | ^^^^^^ 96 | try: 97 | os.unlink(path) | help: Add return type annotation: `None` ANN001 Missing type annotation for function argument `path` --> modules/nixos/hermes/desktop-connections.py:95:12 | 95 | def remove(path): | ^^^^ 96 | try: 97 | os.unlink(path) | SIM105 Use `contextlib.suppress(FileNotFoundError)` instead of `try`-`except`-`pass` --> modules/nixos/hermes/desktop-connections.py:96:5 | 95 | def remove(path): 96 | / try: 97 | | os.unlink(path) 98 | | except FileNotFoundError: 99 | | pass | |____________^ help: Replace `try`-`except`-`pass` with `with contextlib.suppress(FileNotFoundError): ...` PTH108 `os.unlink()` should be replaced by `Path.unlink()` --> modules/nixos/hermes/desktop-connections.py:97:9 | 95 | def remove(path): 96 | try: 97 | os.unlink(path) | ^^^^^^^^^ 98 | except FileNotFoundError: 99 | pass | help: Replace with `Path(...).unlink()` ANN201 Missing return type annotation for public function `plain_token` --> modules/nixos/hermes/desktop-connections.py:102:5 | 102 | def plain_token(value): | ^^^^^^^^^^^ 103 | return {"encoding": "plain", "value": value} | help: Add return type annotation ANN001 Missing type annotation for function argument `value` --> modules/nixos/hermes/desktop-connections.py:102:17 | 102 | def plain_token(value): | ^^^^^ 103 | return {"encoding": "plain", "value": value} | ANN201 Missing return type annotation for public function `managed_entries` --> modules/nixos/hermes/desktop-connections.py:106:5 | 106 | def managed_entries(spec, url, token): | ^^^^^^^^^^^^^^^ 107 | entries = [ 108 | dict(LOCAL_ENTRY), | help: Add return type annotation ANN001 Missing type annotation for function argument `spec` --> modules/nixos/hermes/desktop-connections.py:106:21 | 106 | def managed_entries(spec, url, token): | ^^^^ 107 | entries = [ 108 | dict(LOCAL_ENTRY), | ANN001 Missing type annotation for function argument `url` --> modules/nixos/hermes/desktop-connections.py:106:27 | 106 | def managed_entries(spec, url, token): | ^^^ 107 | entries = [ 108 | dict(LOCAL_ENTRY), | ANN001 Missing type annotation for function argument `token` --> modules/nixos/hermes/desktop-connections.py:106:32 | 106 | def managed_entries(spec, url, token): | ^^^^^ 107 | entries = [ 108 | dict(LOCAL_ENTRY), | PTH123 `open()` should be replaced by `Path.open()` --> modules/nixos/hermes/desktop-connections.py:128:26 | 126 | token_file = remote["tokenFile"] 127 | try: 128 | with open(token_file, encoding="utf-8") as f: | ^^^^ 129 | value = f.read().strip() 130 | except OSError as e: | help: Replace with `Path.open()` ANN201 Missing return type annotation for public function `merge_registry` --> modules/nixos/hermes/desktop-connections.py:138:5 | 138 | def merge_registry(existing, managed, stale_ids): | ^^^^^^^^^^^^^^ 139 | if not isinstance(existing, dict) or existing.get("version") != 2: 140 | existing = {} | help: Add return type annotation ANN001 Missing type annotation for function argument `existing` --> modules/nixos/hermes/desktop-connections.py:138:20 | 138 | def merge_registry(existing, managed, stale_ids): | ^^^^^^^^ 139 | if not isinstance(existing, dict) or existing.get("version") != 2: 140 | existing = {} | ANN001 Missing type annotation for function argument `managed` --> modules/nixos/hermes/desktop-connections.py:138:30 | 138 | def merge_registry(existing, managed, stale_ids): | ^^^^^^^ 139 | if not isinstance(existing, dict) or existing.get("version") != 2: 140 | existing = {} | ANN001 Missing type annotation for function argument `stale_ids` --> modules/nixos/hermes/desktop-connections.py:138:39 | 138 | def merge_registry(existing, managed, stale_ids): | ^^^^^^^^^ 139 | if not isinstance(existing, dict) or existing.get("version") != 2: 140 | existing = {} | PLR2004 Magic value used in comparison, consider replacing `2` with a constant variable --> modules/nixos/hermes/desktop-connections.py:139:69 | 138 | def merge_registry(existing, managed, stale_ids): 139 | if not isinstance(existing, dict) or existing.get("version") != 2: | ^ 140 | existing = {} 141 | old = existing.get("connections") | ANN201 Missing return type annotation for public function `main` --> modules/nixos/hermes/desktop-connections.py:163:5 | 163 | def main(): | ^^^^ 164 | parser = argparse.ArgumentParser() 165 | parser.add_argument("--spec", required=True) | help: Add return type annotation: `int` PTH123 `open()` should be replaced by `Path.open()` --> modules/nixos/hermes/desktop-connections.py:170:10 | 168 | args = parser.parse_args() 169 | 170 | with open(args.spec, encoding="utf-8") as f: | ^^^^ 171 | spec = json.load(f) 172 | token = sys.stdin.read().strip() | help: Replace with `Path.open()` PTH118 `os.path.join()` should be replaced by `Path` with `/` operator --> modules/nixos/hermes/desktop-connections.py:177:56 | 175 | return 1 176 | 177 | config_home = os.environ.get("XDG_CONFIG_HOME") or os.path.join(os.environ["HOME"], ".config") | ^^^^^^^^^^^^ 178 | hermes_dir = os.path.join(config_home, "Hermes") 179 | registry_path = os.path.join(hermes_dir, "connections.json") | PTH118 `os.path.join()` should be replaced by `Path` with `/` operator --> modules/nixos/hermes/desktop-connections.py:178:18 | 177 | config_home = os.environ.get("XDG_CONFIG_HOME") or os.path.join(os.environ["HOME"], ".config") 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") | PTH118 `os.path.join()` should be replaced by `Path` with `/` operator --> modules/nixos/hermes/desktop-connections.py:179:21 | 177 | config_home = os.environ.get("XDG_CONFIG_HOME") or os.path.join(os.environ["HOME"], ".config") 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:180:23 | 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