nixbot

builds

failed treefmt-check checks.aarch64-linux.treefmt · build #98 · raw

1tribuchet: hub connection lost (hub closed event stream without a result); reconnecting2tribuchet: building on eliza3treefmt v2.5.0ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 145PIE810 Call `startswith` once with a `tuple`6 --> checks/linkcheck/main.py:49:127 |847 | continue948 |1049 | if title.startswith("User:") or title.startswith("Talk:"):11 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^1250 | root.remove(page)1351 | continue14 |15help: Merge into a single `startswith` call1617EXE005 Shebang should be at the beginning of the file18 --> modules/nixos-wiki/update-extensions.py:2:119 |201 | #!/usr/bin/env nix-shell212 | #!nix-shell -i python3 -p nixfmt-rfc-style python3 python3Packages.requests python3Packages.beautifulsoup4 gh22 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^233 | import json244 | import os25 |2627TRY002 Create your own exception28 --> modules/nixos-wiki/update-extensions.py:34:1529 |3032 | content = soup.find(id="mw-content-text")3133 | if content and "does not exist" in content.get_text():3234 | raise Exception(33 | _______________^3435 | | f"Extension '{extension_name}' does not exist for MediaWiki version REL{mediawiki_version}"3536 | | )36 | |_________^3737 |3838 | # Look for download links - the class is now a list ['external', 'free']39 |4041TRY002 Create your own exception42 --> modules/nixos-wiki/update-extensions.py:47:1143 |4445 | return urllib.parse.urlparse(href)4546 |4647 | raise Exception(47 | ___________^4848 | | f"Could not find download URL for extension '{extension_name}' version REL{mediawiki_version}"4949 | | )50 | |_____^5152FURB122 Use of `f.write` in a for loop53 --> modules/nixos-wiki/update-extensions.py:73:1354 |5571 | r.raise_for_status()5672 | with open(local_filename, "wb") as f:5773 | / for chunk in r.iter_content(chunk_size=8192):5874 | | # If you have chunk encoded response uncomment if5975 | | # and set chunk_size parameter to None.6076 | | # if chunk:6177 | | f.write(chunk)62 | |______________________________^6378 | return local_filename64 |65help: Replace with `f.writelines`6667TRY002 Create your own exception68 --> modules/nixos-wiki/update-extensions.py:116:1969 |70114 | data = response.json()71115 | if not data:72116 | raise Exception(f"No tags found for {repo}")73 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^74117 | latest_tag = data[0]["name"]75118 | return f"https://github.com/{repo}/archive/refs/tags/{latest_tag}.zip"76 |7778TRY002 Create your own exception79 --> modules/nixos-wiki/update-extensions.py:120:1580 |81118 | return f"https://github.com/{repo}/archive/refs/tags/{latest_tag}.zip"82119 | else:83120 | raise Exception(f"Unknown extension type: {extension_type}")84 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^8586TRY002 Create your own exception87 --> modules/nixos-wiki/update-extensions.py:144:1188 |89142 | else:90143 | return Extension(name=extension_name, hash=hash, url=download_url)91144 | raise Exception("Failed to fetch extension, see above")92 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^9394TRY002 Create your own exception95 --> modules/nixos-wiki/update-extensions.py:173:1196 |97171 | else:98172 | return Extension(name=extension_name, hash=hash, url=mirror_url)99173 | raise Exception("Failed to fetch extension, see above")100 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^101102EXE001 Shebang is present but file is not executable103 --> pkgs/wiki-user-search/wiki-user-search.py:1:1104 |1051 | #!/usr/bin/env python3106 | ^^^^^^^^^^^^^^^^^^^^^^1072 | """1083 | MediaWiki User Search Tool109 |110111Found 27 errors (17 fixed, 10 remaining).112No fixes available (2 hidden fixes can be enabled with the `--unsafe-fixes` option).113114traversed 71 files115emitted 55 files for processing116formatted 52 files (3 changed) in 638ms117Error: failed to finalise formatting: formatting failures detected