nixbot

builds

failed treefmt-check checks.aarch64-darwin.treefmt · build #44 · raw

1treefmt v2.6.0ERRO formatter | ruff-check: failed to apply with options '[check --fix weather-cli/lib/weather_cli/__init__.py weather-cli/lib/weather_cli/main.py]': exit status 123CPY001 Missing copyright notice at top of file4--> weather-cli/lib/weather_cli/__init__.py:1:156CPY001 Missing copyright notice at top of file7--> weather-cli/lib/weather_cli/main.py:1:189Found 2 errors.1011ERRO formatter | ruff-check: failed to apply with options '[check --fix kagi-search/kagi_search.py]': exit status 11213BLE001 Do not catch blind exception: `Exception`14 --> kagi-search/kagi_search.py:199:1615 |16197 | print(stderr_msg, file=sys.stderr)17198 | sys.exit(1)18199 | except Exception as e:19 | ^^^^^^^^^20200 | error_msg = colorize(f"Error getting session token: {e}", color="red", bold=True)21201 | print(error_msg, file=sys.stderr)22 |2324TRY002 Create your own exception25 --> kagi-search/kagi_search.py:218:2326 |27216 | return # Success28217 | elif "/signin" in final_url or "/welcome" in final_url:29218 | raise Exception(f"Authentication failed - redirected to {final_url}")30 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^31219 | except Exception as e:32220 | raise Exception(f"Failed to authenticate with token: {e}")33 |3435BLE001 Do not catch blind exception: `Exception`36 --> kagi-search/kagi_search.py:219:1637 |38217 | elif "/signin" in final_url or "/welcome" in final_url:39218 | raise Exception(f"Authentication failed - redirected to {final_url}")40219 | except Exception as e:41 | ^^^^^^^^^42220 | raise Exception(f"Failed to authenticate with token: {e}")43 |4445TRY002 Create your own exception46 --> kagi-search/kagi_search.py:220:1947 |48218 | raise Exception(f"Authentication failed - redirected to {final_url}")49219 | except Exception as e:50220 | raise Exception(f"Failed to authenticate with token: {e}")51 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^52221 |53222 | def search(self, query: str, limit: int = 10) -> list[SearchResult]:54 |5556TRY002 Create your own exception57 --> kagi-search/kagi_search.py:260:2758 |59258 | final_url = response.geturl()60259 | if "/signin" in final_url or "/welcome" in final_url:61260 | raise Exception(f"Authentication failed - redirected to {final_url}")62 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^63261 |64262 | # Read response65 |6667TRY002 Create your own exception68 --> kagi-search/kagi_search.py:280:2769 |70278 | time.sleep(retry_delay)71279 | continue72280 | raise Exception("No results box found on page")73 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^74281 |75282 | # Extract search results76 |7778TRY004 Prefer `TypeError` exception for invalid type79 --> kagi-search/kagi_search.py:285:2180 |81283 | results = []82284 | if not isinstance(results_box, Tag):83285 | raise Exception("Results box is not a Tag element")84 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^85286 | search_results = results_box.find_all(class_="search-result")86 |8788TRY002 Create your own exception89 --> kagi-search/kagi_search.py:285:2790 |91283 | results = []92284 | if not isinstance(results_box, Tag):93285 | raise Exception("Results box is not a Tag element")94 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^95286 | search_results = results_box.find_all(class_="search-result")96 |9798TRY002 Create your own exception99 --> kagi-search/kagi_search.py:332:23100 |101330 | time.sleep(retry_delay)102331 | continue103332 | raise Exception(f"Request failed: {e}")104 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^105333 |106334 | return []107 |108109TRY002 Create your own exception110 --> kagi-search/kagi_search.py:385:23111 |112383 | logger.debug(f"Final URL: {final_url}")113384 | if "/signin" in final_url or "/welcome" in final_url:114385 | raise Exception(f"Authentication failed - redirected to {final_url}")115 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^116386 |117387 | # Read response118 |119120BLE001 Do not catch blind exception: `Exception`121 --> kagi-search/kagi_search.py:460:16122 |123458 | )124459 |125460 | except Exception as e:126 | ^^^^^^^^^127461 | # Quick Answer might not be available for all queries128462 | logger.debug(f"Quick Answer error: {type(e).__name__}: {e}")129 |130131BLE001 Do not catch blind exception: `Exception`132 --> kagi-search/kagi_search.py:500:12133 |134498 | try:135499 | client = KagiSearch(session_token=args.token, config_path=args.config)136500 | except Exception as e:137 | ^^^^^^^^^138501 | error_msg = colorize(f"Error initializing Kagi client: {e}", color="red", bold=True)139502 | print(error_msg, file=sys.stderr)140 |141142BLE001 Do not catch blind exception: `Exception`143 --> kagi-search/kagi_search.py:509:12144 |145507 | results = client.search(args.query, limit=args.num_results) if args.links else []146508 | quick_answer = client.get_quick_answer(args.query)147509 | except Exception as e:148 | ^^^^^^^^^149510 | error_msg = colorize(f"Search failed: {e}", color="red", bold=True)150511 | print(error_msg, file=sys.stderr)151 |152153Found 28 errors (15 fixed, 13 remaining).154155ERRO formatter | ruff-check: failed to apply with options '[check --fix browser-cli/browser_cli/__init__.py browser-cli/browser_cli/__main__.py browser-cli/browser_cli/bridge.py browser-cli/browser_cli/browsh.py browser-cli/browser_cli/cli.py browser-cli/browser_cli/client.py browser-cli/browser_cli/config.py browser-cli/browser_cli/errors.py browser-cli/browser_cli/paths.py browser-cli/browser_cli/server.py]': exit status 1156157CPY001 Missing copyright notice at top of file158--> browser-cli/browser_cli/__init__.py:1:1159160CPY001 Missing copyright notice at top of file161--> browser-cli/browser_cli/__main__.py:1:1162163CPY001 Missing copyright notice at top of file164--> browser-cli/browser_cli/bridge.py:1:1165166CPY001 Missing copyright notice at top of file167--> browser-cli/browser_cli/browsh.py:1:1168169CPY001 Missing copyright notice at top of file170--> browser-cli/browser_cli/cli.py:1:1171172CPY001 Missing copyright notice at top of file173--> browser-cli/browser_cli/client.py:1:1174175CPY001 Missing copyright notice at top of file176--> browser-cli/browser_cli/config.py:1:1177178CPY001 Missing copyright notice at top of file179--> browser-cli/browser_cli/errors.py:1:1180181CPY001 Missing copyright notice at top of file182--> browser-cli/browser_cli/paths.py:1:1183184CPY001 Missing copyright notice at top of file185--> browser-cli/browser_cli/server.py:1:1186187Found 10 errors.188189ERRO formatter | ruff-check: failed to apply with options '[check --fix screenshot-cli/screenshot_cli.py screenshot-cli/test_screenshot_cli.py]': exit status 1190191EXE001 Shebang is present but file is not executable192 --> screenshot-cli/screenshot_cli.py:1:1193 |1941 | #!/usr/bin/env python3195 | ^^^^^^^^^^^^^^^^^^^^^^1962 | """Non-interactive screenshot CLI for agent use on macOS and Linux Wayland.197 |198199DTZ005 `datetime.datetime.now()` called without a `tz` argument200 --> screenshot-cli/screenshot_cli.py:261:14201 |202259 | # Include microseconds: niri actions complete in ~150ms so two calls203260 | # easily land in the same wall-clock second and clobber each other.204261 | ts = datetime.now().strftime("%Y%m%d-%H%M%S-%f")205 | ^^^^^^^^^^^^^^206262 | output = str(outdir / f"screenshot-{ts}.png")207263 | Path(output).parent.mkdir(parents=True, exist_ok=True)208 |209help: Pass a `datetime.timezone` object to the `tz` parameter210211Found 3 errors (1 fixed, 2 remaining).212213ERRO formatter | ruff-check: failed to apply with options '[check --fix tasker-cli/lib/tasker_cli/__init__.py tasker-cli/lib/tasker_cli/adb.py tasker-cli/lib/tasker_cli/config.py tasker-cli/lib/tasker_cli/main.py tasker-cli/lib/tasker_cli/specs.py tasker-cli/lib/tasker_cli/webui.py tasker-cli/tests/__init__.py tasker-cli/tests/conftest.py tasker-cli/tests/test_deploy.py tasker-cli/tests/test_specs.py]': exit status 1214215CPY001 Missing copyright notice at top of file216--> tasker-cli/lib/tasker_cli/__init__.py:1:1217218CPY001 Missing copyright notice at top of file219--> tasker-cli/lib/tasker_cli/adb.py:1:1220221CPY001 Missing copyright notice at top of file222--> tasker-cli/lib/tasker_cli/config.py:1:1223224CPY001 Missing copyright notice at top of file225--> tasker-cli/lib/tasker_cli/main.py:1:1226227CPY001 Missing copyright notice at top of file228--> tasker-cli/lib/tasker_cli/specs.py:1:1229230CPY001 Missing copyright notice at top of file231--> tasker-cli/lib/tasker_cli/webui.py:1:1232233RUF036 `None` not at the end of the type union.234 --> tasker-cli/lib/tasker_cli/webui.py:17:5235 |23615 | # JSON type aliases for the untyped WebUI responses23716 | type JsonValue = (23817 | str | int | float | bool | None | list[JsonValue] | dict[str, JsonValue]239 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^24018 | )241 |242help: Move `None` to the end of the type union243244CPY001 Missing copyright notice at top of file245--> tasker-cli/tests/__init__.py:1:1246247CPY001 Missing copyright notice at top of file248--> tasker-cli/tests/conftest.py:1:1249250CPY001 Missing copyright notice at top of file251--> tasker-cli/tests/test_deploy.py:1:1252253CPY001 Missing copyright notice at top of file254--> tasker-cli/tests/test_specs.py:1:1255256Found 11 errors.257No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).258259ERRO formatter | ruff-check: failed to apply with options '[check --fix gmaps-cli/gmaps_cli.py gmaps-cli/test_gmaps_cli_integration.py]': exit status 1260261CPY001 Missing copyright notice at top of file262--> gmaps-cli/gmaps_cli.py:1:1263264CPY001 Missing copyright notice at top of file265--> gmaps-cli/test_gmaps_cli_integration.py:1:1266267Found 5 errors (3 fixed, 2 remaining).268269ERRO formatter | ruff-check: failed to apply with options '[check --fix n8n-cli/n8n_cli/__init__.py n8n-cli/n8n_cli/client.py n8n-cli/n8n_cli/commands/__init__.py n8n-cli/n8n_cli/commands/apply.py n8n-cli/n8n_cli/commands/credential.py n8n-cli/n8n_cli/commands/datatable.py n8n-cli/n8n_cli/commands/execution.py n8n-cli/n8n_cli/commands/import_wf.py n8n-cli/n8n_cli/commands/raw.py n8n-cli/n8n_cli/commands/tag.py n8n-cli/n8n_cli/commands/test_wf.py n8n-cli/n8n_cli/commands/workflow.py n8n-cli/n8n_cli/config.py n8n-cli/n8n_cli/errors.py n8n-cli/n8n_cli/main.py n8n-cli/n8n_cli/output.py n8n-cli/n8n_cli/strip.py n8n-cli/tests/__init__.py n8n-cli/tests/conftest.py n8n-cli/tests/test_apply.py n8n-cli/tests/test_credential.py n8n-cli/tests/test_datatable.py n8n-cli/tests/test_errors.py n8n-cli/tests/test_execution.py n8n-cli/tests/test_help.py n8n-cli/tests/test_import.py n8n-cli/tests/test_raw.py n8n-cli/tests/test_tag.py n8n-cli/tests/test_test_command.py n8n-cli/tests/test_workflow.py]': exit status 1270271SIM102 Use a single `if` statement instead of nested `if` statements272 --> n8n-cli/n8n_cli/commands/apply.py:64:13273 |27463 | # Filter by IDs if specified27564 | / if ids:27665 | | if not wf_id or wf_id not in ids:277 | |_________________________________________________^27866 | continue279 |280help: Combine `if` statements using `and`281282SIM103 Return the condition `local.get("active") != remote.get("active")` directly283 --> n8n-cli/n8n_cli/commands/apply.py:137:5284 |285135 | return True286136 | # Compare active state287137 | / if local.get("active") != remote.get("active"):288138 | | return True289139 | | return False290 | |________________^291help: Replace with `return local.get("active") != remote.get("active")`292293SIM102 Use a single `if` statement instead of nested `if` statements294 --> n8n-cli/n8n_cli/commands/apply.py:224:9295 |296222 | local_updated = data.get("updatedAt")297223 | remote_updated = remote.get("updatedAt")298224 | / if local_updated and remote_updated and remote_updated > local_updated:299225 | | if not ns.force:300 | |____________________________^301226 | print(302227 | f" conflict: {basename} (remote is newer: {remote_updated} > {local_updated})"303 |304help: Combine `if` statements using `and`305306SIM117 Use a single `with` statement with multiple contexts instead of nested `with` statements307 --> n8n-cli/tests/test_errors.py:14:9308 |30912 | """Missing API URL/key produces a ConfigError, not a traceback."""31013 | env = {"N8N_API_URL": "", "N8N_API_KEY": ""}31114 | / with patch.dict("os.environ", env, clear=False):31215 | | with patch("sys.argv", ["n8n-cli", "credential", "list"]):313 | |______________________________________________________________________^31416 | with pytest.raises(SystemExit) as exc_info:31517 | main()316 |317help: Combine `with` statements318319SIM117 Use a single `with` statement with multiple contexts instead of nested `with` statements320 --> n8n-cli/tests/test_errors.py:24:9321 |32222 | def test_unknown_command(self, capsys: pytest.CaptureFixture[str]) -> None:32323 | """Unknown top-level command exits with code 2 (argparse error)."""32424 | / with patch.dict("os.environ", {"N8N_API_URL": "x", "N8N_API_KEY": "x"}):32525 | | with patch("sys.argv", ["n8n-cli", "bogus"]):326 | |_________________________________________________________^32726 | with pytest.raises(SystemExit) as exc_info:32827 | main()329 |330help: Combine `with` statements331332Found 16 errors (11 fixed, 5 remaining).333No fixes available (2 hidden fixes can be enabled with the `--unsafe-fixes` option).334335ERRO formatter | ruff-check: failed to apply with options '[check --fix calendar-cli/calendar_cli/__init__.py calendar-cli/calendar_cli/cache.py calendar-cli/calendar_cli/config.py calendar-cli/calendar_cli/create.py calendar-cli/calendar_cli/email_invite.py calendar-cli/calendar_cli/errors.py calendar-cli/calendar_cli/import_invite.py calendar-cli/calendar_cli/main.py calendar-cli/calendar_cli/models.py calendar-cli/calendar_cli/parse.py calendar-cli/calendar_cli/reply.py calendar-cli/calendar_cli/store.py calendar-cli/calendar_cli/timeutil.py calendar-cli/calendar_cli/util.py calendar-cli/tests/__init__.py calendar-cli/tests/conftest.py calendar-cli/tests/helpers.py calendar-cli/tests/test_cache.py calendar-cli/tests/test_cli.py calendar-cli/tests/test_import.py calendar-cli/tests/test_invite.py calendar-cli/tests/test_reply.py calendar-cli/tests/test_store.py]': exit status 1336337CPY001 Missing copyright notice at top of file338--> calendar-cli/calendar_cli/__init__.py:1:1339340CPY001 Missing copyright notice at top of file341--> calendar-cli/calendar_cli/cache.py:1:1342343CPY001 Missing copyright notice at top of file344--> calendar-cli/calendar_cli/config.py:1:1345346CPY001 Missing copyright notice at top of file347--> calendar-cli/calendar_cli/create.py:1:1348349CPY001 Missing copyright notice at top of file350--> calendar-cli/calendar_cli/email_invite.py:1:1351352CPY001 Missing copyright notice at top of file353--> calendar-cli/calendar_cli/errors.py:1:1354355CPY001 Missing copyright notice at top of file356--> calendar-cli/calendar_cli/import_invite.py:1:1357358CPY001 Missing copyright notice at top of file359--> calendar-cli/calendar_cli/main.py:1:1360361CPY001 Missing copyright notice at top of file362--> calendar-cli/calendar_cli/models.py:1:1363364CPY001 Missing copyright notice at top of file365--> calendar-cli/calendar_cli/parse.py:1:1366367CPY001 Missing copyright notice at top of file368--> calendar-cli/calendar_cli/reply.py:1:1369370CPY001 Missing copyright notice at top of file371--> calendar-cli/calendar_cli/store.py:1:1372373CPY001 Missing copyright notice at top of file374--> calendar-cli/calendar_cli/timeutil.py:1:1375376CPY001 Missing copyright notice at top of file377--> calendar-cli/calendar_cli/util.py:1:1378379CPY001 Missing copyright notice at top of file380--> calendar-cli/tests/__init__.py:1:1381382CPY001 Missing copyright notice at top of file383--> calendar-cli/tests/conftest.py:1:1384385CPY001 Missing copyright notice at top of file386--> calendar-cli/tests/helpers.py:1:1387388CPY001 Missing copyright notice at top of file389--> calendar-cli/tests/test_cache.py:1:1390391CPY001 Missing copyright notice at top of file392--> calendar-cli/tests/test_cli.py:1:1393394CPY001 Missing copyright notice at top of file395--> calendar-cli/tests/test_import.py:1:1396397CPY001 Missing copyright notice at top of file398--> calendar-cli/tests/test_invite.py:1:1399400CPY001 Missing copyright notice at top of file401--> calendar-cli/tests/test_reply.py:1:1402403CPY001 Missing copyright notice at top of file404--> calendar-cli/tests/test_store.py:1:1405406Found 23 errors.407408ERRO formatter | ruff-check: failed to apply with options '[check --fix pexpect-cli/pexpect_cli/__init__.py pexpect-cli/pexpect_cli/client.py pexpect-cli/pexpect_cli/server.py pexpect-cli/tests/__init__.py pexpect-cli/tests/test_integration.py]': exit status 1409410CPY001 Missing copyright notice at top of file411--> pexpect-cli/pexpect_cli/__init__.py:1:1412413CPY001 Missing copyright notice at top of file414--> pexpect-cli/pexpect_cli/client.py:1:1415416CPY001 Missing copyright notice at top of file417--> pexpect-cli/pexpect_cli/server.py:1:1418419CPY001 Missing copyright notice at top of file420--> pexpect-cli/tests/__init__.py:1:1421422CPY001 Missing copyright notice at top of file423--> pexpect-cli/tests/test_integration.py:1:1424425Found 5 errors.426427traversed 188 files428emitted 166 files for processing429formatted 81 files (8 changed) in 2.248s430Error: failed to finalise formatting: formatting failures detected