nixbot

builds
1tribuchet: building on jamie2treefmt v2.5.0ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 134CPY001 Missing copyright notice at top of file5--> weather-cli/lib/weather_cli/__init__.py:1:167CPY001 Missing copyright notice at top of file8--> weather-cli/lib/weather_cli/main.py:1:1910Found 2 errors.1112ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 11314BLE001 Do not catch blind exception: `Exception`15 --> kagi-search/kagi_search.py:199:1616 |17197 | print(stderr_msg, file=sys.stderr)18198 | sys.exit(1)19199 | except Exception as e:20 | ^^^^^^^^^21200 | error_msg = colorize(f"Error getting session token: {e}", color="red", bold=True)22201 | print(error_msg, file=sys.stderr)23 |2425TRY002 Create your own exception26 --> kagi-search/kagi_search.py:218:2327 |28216 | return # Success29217 | elif "/signin" in final_url or "/welcome" in final_url:30218 | raise Exception(f"Authentication failed - redirected to {final_url}")31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^32219 | except Exception as e:33220 | raise Exception(f"Failed to authenticate with token: {e}")34 |3536BLE001 Do not catch blind exception: `Exception`37 --> kagi-search/kagi_search.py:219:1638 |39217 | elif "/signin" in final_url or "/welcome" in final_url:40218 | raise Exception(f"Authentication failed - redirected to {final_url}")41219 | except Exception as e:42 | ^^^^^^^^^43220 | raise Exception(f"Failed to authenticate with token: {e}")44 |4546TRY002 Create your own exception47 --> kagi-search/kagi_search.py:220:1948 |49218 | raise Exception(f"Authentication failed - redirected to {final_url}")50219 | except Exception as e:51220 | raise Exception(f"Failed to authenticate with token: {e}")52 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^53221 |54222 | def search(self, query: str, limit: int = 10) -> list[SearchResult]:55 |5657TRY002 Create your own exception58 --> kagi-search/kagi_search.py:260:2759 |60258 | final_url = response.geturl()61259 | if "/signin" in final_url or "/welcome" in final_url:62260 | raise Exception(f"Authentication failed - redirected to {final_url}")63 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^64261 |65262 | # Read response66 |6768TRY002 Create your own exception69 --> kagi-search/kagi_search.py:280:2770 |71278 | time.sleep(retry_delay)72279 | continue73280 | raise Exception("No results box found on page")74 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^75281 |76282 | # Extract search results77 |7879TRY004 Prefer `TypeError` exception for invalid type80 --> kagi-search/kagi_search.py:285:2181 |82283 | results = []83284 | if not isinstance(results_box, Tag):84285 | raise Exception("Results box is not a Tag element")85 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^86286 | search_results = results_box.find_all(class_="search-result")87 |8889TRY002 Create your own exception90 --> kagi-search/kagi_search.py:285:2791 |92283 | results = []93284 | if not isinstance(results_box, Tag):94285 | raise Exception("Results box is not a Tag element")95 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^96286 | search_results = results_box.find_all(class_="search-result")97 |9899TRY002 Create your own exception100 --> kagi-search/kagi_search.py:332:23101 |102330 | time.sleep(retry_delay)103331 | continue104332 | raise Exception(f"Request failed: {e}")105 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^106333 |107334 | return []108 |109110TRY002 Create your own exception111 --> kagi-search/kagi_search.py:385:23112 |113383 | logger.debug(f"Final URL: {final_url}")114384 | if "/signin" in final_url or "/welcome" in final_url:115385 | raise Exception(f"Authentication failed - redirected to {final_url}")116 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^117386 |118387 | # Read response119 |120121BLE001 Do not catch blind exception: `Exception`122 --> kagi-search/kagi_search.py:460:16123 |124458 | )125459 |126460 | except Exception as e:127 | ^^^^^^^^^128461 | # Quick Answer might not be available for all queries129462 | logger.debug(f"Quick Answer error: {type(e).__name__}: {e}")130 |131132BLE001 Do not catch blind exception: `Exception`133 --> kagi-search/kagi_search.py:500:12134 |135498 | try:136499 | client = KagiSearch(session_token=args.token, config_path=args.config)137500 | except Exception as e:138 | ^^^^^^^^^139501 | error_msg = colorize(f"Error initializing Kagi client: {e}", color="red", bold=True)140502 | print(error_msg, file=sys.stderr)141 |142143BLE001 Do not catch blind exception: `Exception`144 --> kagi-search/kagi_search.py:509:12145 |146507 | results = client.search(args.query, limit=args.num_results) if args.links else []147508 | quick_answer = client.get_quick_answer(args.query)148509 | except Exception as e:149 | ^^^^^^^^^150510 | error_msg = colorize(f"Search failed: {e}", color="red", bold=True)151511 | print(error_msg, file=sys.stderr)152 |153154Found 28 errors (15 fixed, 13 remaining).155156ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1157158CPY001 Missing copyright notice at top of file159--> browser-cli/browser_cli/__init__.py:1:1160161CPY001 Missing copyright notice at top of file162--> browser-cli/browser_cli/__main__.py:1:1163164CPY001 Missing copyright notice at top of file165--> browser-cli/browser_cli/bridge.py:1:1166167CPY001 Missing copyright notice at top of file168--> browser-cli/browser_cli/browsh.py:1:1169170CPY001 Missing copyright notice at top of file171--> browser-cli/browser_cli/cli.py:1:1172173CPY001 Missing copyright notice at top of file174--> browser-cli/browser_cli/client.py:1:1175176CPY001 Missing copyright notice at top of file177--> browser-cli/browser_cli/config.py:1:1178179CPY001 Missing copyright notice at top of file180--> browser-cli/browser_cli/errors.py:1:1181182CPY001 Missing copyright notice at top of file183--> browser-cli/browser_cli/paths.py:1:1184185CPY001 Missing copyright notice at top of file186--> browser-cli/browser_cli/server.py:1:1187188Found 10 errors.189190ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1191192EXE001 Shebang is present but file is not executable193 --> screenshot-cli/screenshot_cli.py:1:1194 |1951 | #!/usr/bin/env python3196 | ^^^^^^^^^^^^^^^^^^^^^^1972 | """Non-interactive screenshot CLI for agent use on macOS and Linux Wayland.198 |199200DTZ005 `datetime.datetime.now()` called without a `tz` argument201 --> screenshot-cli/screenshot_cli.py:261:14202 |203259 | # Include microseconds: niri actions complete in ~150ms so two calls204260 | # easily land in the same wall-clock second and clobber each other.205261 | ts = datetime.now().strftime("%Y%m%d-%H%M%S-%f")206 | ^^^^^^^^^^^^^^207262 | output = str(outdir / f"screenshot-{ts}.png")208263 | Path(output).parent.mkdir(parents=True, exist_ok=True)209 |210help: Pass a `datetime.timezone` object to the `tz` parameter211212Found 3 errors (1 fixed, 2 remaining).213214ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1215216CPY001 Missing copyright notice at top of file217--> pexpect-cli/pexpect_cli/__init__.py:1:1218219CPY001 Missing copyright notice at top of file220--> pexpect-cli/pexpect_cli/client.py:1:1221222CPY001 Missing copyright notice at top of file223--> pexpect-cli/pexpect_cli/server.py:1:1224225CPY001 Missing copyright notice at top of file226--> pexpect-cli/tests/__init__.py:1:1227228CPY001 Missing copyright notice at top of file229--> pexpect-cli/tests/test_integration.py:1:1230231Found 5 errors.232233ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1234235CPY001 Missing copyright notice at top of file236--> gmaps-cli/gmaps_cli.py:1:1237238CPY001 Missing copyright notice at top of file239--> gmaps-cli/test_gmaps_cli_integration.py:1:1240241Found 5 errors (3 fixed, 2 remaining).242243ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1244245CPY001 Missing copyright notice at top of file246--> tasker-cli/lib/tasker_cli/__init__.py:1:1247248CPY001 Missing copyright notice at top of file249--> tasker-cli/lib/tasker_cli/adb.py:1:1250251CPY001 Missing copyright notice at top of file252--> tasker-cli/lib/tasker_cli/config.py:1:1253254CPY001 Missing copyright notice at top of file255--> tasker-cli/lib/tasker_cli/main.py:1:1256257CPY001 Missing copyright notice at top of file258--> tasker-cli/lib/tasker_cli/specs.py:1:1259260CPY001 Missing copyright notice at top of file261--> tasker-cli/lib/tasker_cli/webui.py:1:1262263RUF036 `None` not at the end of the type union.264 --> tasker-cli/lib/tasker_cli/webui.py:17:5265 |26615 | # JSON type aliases for the untyped WebUI responses26716 | type JsonValue = (26817 | str | int | float | bool | None | list[JsonValue] | dict[str, JsonValue]269 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^27018 | )271 |272help: Move `None` to the end of the type union273274CPY001 Missing copyright notice at top of file275--> tasker-cli/tests/__init__.py:1:1276277CPY001 Missing copyright notice at top of file278--> tasker-cli/tests/conftest.py:1:1279280CPY001 Missing copyright notice at top of file281--> tasker-cli/tests/test_deploy.py:1:1282283CPY001 Missing copyright notice at top of file284--> tasker-cli/tests/test_specs.py:1:1285286Found 11 errors.287No fixes available (1 hidden fix can be enabled with the `--unsafe-fixes` option).288289ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1290291SIM102 Use a single `if` statement instead of nested `if` statements292 --> n8n-cli/n8n_cli/commands/apply.py:64:13293 |29463 | # Filter by IDs if specified29564 | / if ids:29665 | | if not wf_id or wf_id not in ids:297 | |_________________________________________________^29866 | continue299 |300help: Combine `if` statements using `and`301302SIM103 Return the condition `local.get("active") != remote.get("active")` directly303 --> n8n-cli/n8n_cli/commands/apply.py:137:5304 |305135 | return True306136 | # Compare active state307137 | / if local.get("active") != remote.get("active"):308138 | | return True309139 | | return False310 | |________________^311help: Replace with `return local.get("active") != remote.get("active")`312313SIM102 Use a single `if` statement instead of nested `if` statements314 --> n8n-cli/n8n_cli/commands/apply.py:224:9315 |316222 | local_updated = data.get("updatedAt")317223 | remote_updated = remote.get("updatedAt")318224 | / if local_updated and remote_updated and remote_updated > local_updated:319225 | | if not ns.force:320 | |____________________________^321226 | print(322227 | f" conflict: {basename} (remote is newer: {remote_updated} > {local_updated})"323 |324help: Combine `if` statements using `and`325326SIM117 Use a single `with` statement with multiple contexts instead of nested `with` statements327 --> n8n-cli/tests/test_errors.py:14:9328 |32912 | """Missing API URL/key produces a ConfigError, not a traceback."""33013 | env = {"N8N_API_URL": "", "N8N_API_KEY": ""}33114 | / with patch.dict("os.environ", env, clear=False):33215 | | with patch("sys.argv", ["n8n-cli", "credential", "list"]):333 | |______________________________________________________________________^33416 | with pytest.raises(SystemExit) as exc_info:33517 | main()336 |337help: Combine `with` statements338339SIM117 Use a single `with` statement with multiple contexts instead of nested `with` statements340 --> n8n-cli/tests/test_errors.py:24:9341 |34222 | def test_unknown_command(self, capsys: pytest.CaptureFixture[str]) -> None:34323 | """Unknown top-level command exits with code 2 (argparse error)."""34424 | / with patch.dict("os.environ", {"N8N_API_URL": "x", "N8N_API_KEY": "x"}):34525 | | with patch("sys.argv", ["n8n-cli", "bogus"]):346 | |_________________________________________________________^34726 | with pytest.raises(SystemExit) as exc_info:34827 | main()349 |350help: Combine `with` statements351352Found 16 errors (11 fixed, 5 remaining).353No fixes available (2 hidden fixes can be enabled with the `--unsafe-fixes` option).354355ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 1356357CPY001 Missing copyright notice at top of file358--> calendar-cli/calendar_cli/__init__.py:1:1359360CPY001 Missing copyright notice at top of file361--> calendar-cli/calendar_cli/cache.py:1:1362363CPY001 Missing copyright notice at top of file364--> calendar-cli/calendar_cli/config.py:1:1365366CPY001 Missing copyright notice at top of file367--> calendar-cli/calendar_cli/create.py:1:1368369CPY001 Missing copyright notice at top of file370--> calendar-cli/calendar_cli/email_invite.py:1:1371372CPY001 Missing copyright notice at top of file373--> calendar-cli/calendar_cli/errors.py:1:1374375CPY001 Missing copyright notice at top of file376--> calendar-cli/calendar_cli/import_invite.py:1:1377378CPY001 Missing copyright notice at top of file379--> calendar-cli/calendar_cli/main.py:1:1380381CPY001 Missing copyright notice at top of file382--> calendar-cli/calendar_cli/models.py:1:1383384CPY001 Missing copyright notice at top of file385--> calendar-cli/calendar_cli/parse.py:1:1386387CPY001 Missing copyright notice at top of file388--> calendar-cli/calendar_cli/reply.py:1:1389390CPY001 Missing copyright notice at top of file391--> calendar-cli/calendar_cli/store.py:1:1392393CPY001 Missing copyright notice at top of file394--> calendar-cli/calendar_cli/timeutil.py:1:1395396CPY001 Missing copyright notice at top of file397--> calendar-cli/calendar_cli/util.py:1:1398399CPY001 Missing copyright notice at top of file400--> calendar-cli/tests/__init__.py:1:1401402CPY001 Missing copyright notice at top of file403--> calendar-cli/tests/conftest.py:1:1404405CPY001 Missing copyright notice at top of file406--> calendar-cli/tests/helpers.py:1:1407408CPY001 Missing copyright notice at top of file409--> calendar-cli/tests/test_cache.py:1:1410411CPY001 Missing copyright notice at top of file412--> calendar-cli/tests/test_cli.py:1:1413414CPY001 Missing copyright notice at top of file415--> calendar-cli/tests/test_import.py:1:1416417CPY001 Missing copyright notice at top of file418--> calendar-cli/tests/test_invite.py:1:1419420CPY001 Missing copyright notice at top of file421--> calendar-cli/tests/test_reply.py:1:1422423CPY001 Missing copyright notice at top of file424--> calendar-cli/tests/test_store.py:1:1425426Found 23 errors.427428traversed 188 files429emitted 166 files for processing430formatted 81 files (8 changed) in 2.955s431Error: failed to finalise formatting: formatting failures detected