nixbot

builds
1treefmt v2.5.0ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 123PIE810 Call `startswith` once with a `tuple`4 --> checks/linkcheck/main.py:49:125 |647 | continue748 |849 | if title.startswith("User:") or title.startswith("Talk:"):9 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^1050 | root.remove(page)1151 | continue12 |13help: Merge into a single `startswith` call1415EXE005 Shebang should be at the beginning of the file16 --> modules/nixos-wiki/update-extensions.py:2:117 |181 | #!/usr/bin/env nix-shell192 | #!nix-shell -i python3 -p nixfmt-rfc-style python3 python3Packages.requests python3Packages.beautifulsoup4 gh20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^213 | import json224 | import os23 |2425TRY002 Create your own exception26 --> modules/nixos-wiki/update-extensions.py:34:1527 |2832 | content = soup.find(id="mw-content-text")2933 | if content and "does not exist" in content.get_text():3034 | raise Exception(31 | _______________^3235 | | f"Extension '{extension_name}' does not exist for MediaWiki version REL{mediawiki_version}"3336 | | )34 | |_________^3537 |3638 | # Look for download links - the class is now a list ['external', 'free']37 |3839TRY002 Create your own exception40 --> modules/nixos-wiki/update-extensions.py:47:1141 |4245 | return urllib.parse.urlparse(href)4346 |4447 | raise Exception(45 | ___________^4648 | | f"Could not find download URL for extension '{extension_name}' version REL{mediawiki_version}"4749 | | )48 | |_____^4950FURB122 Use of `f.write` in a for loop51 --> modules/nixos-wiki/update-extensions.py:73:1352 |5371 | r.raise_for_status()5472 | with open(local_filename, "wb") as f:5573 | / for chunk in r.iter_content(chunk_size=8192):5674 | | # If you have chunk encoded response uncomment if5775 | | # and set chunk_size parameter to None.5876 | | # if chunk:5977 | | f.write(chunk)60 | |______________________________^6178 | return local_filename62 |63help: Replace with `f.writelines`6465TRY002 Create your own exception66 --> modules/nixos-wiki/update-extensions.py:116:1967 |68114 | data = response.json()69115 | if not data:70116 | raise Exception(f"No tags found for {repo}")71 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^72117 | latest_tag = data[0]["name"]73118 | return f"https://github.com/{repo}/archive/refs/tags/{latest_tag}.zip"74 |7576TRY002 Create your own exception77 --> modules/nixos-wiki/update-extensions.py:120:1578 |79118 | return f"https://github.com/{repo}/archive/refs/tags/{latest_tag}.zip"80119 | else:81120 | raise Exception(f"Unknown extension type: {extension_type}")82 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^8384TRY002 Create your own exception85 --> modules/nixos-wiki/update-extensions.py:144:1186 |87142 | else:88143 | return Extension(name=extension_name, hash=hash, url=download_url)89144 | raise Exception("Failed to fetch extension, see above")90 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^9192TRY002 Create your own exception93 --> modules/nixos-wiki/update-extensions.py:173:1194 |95171 | else:96172 | return Extension(name=extension_name, hash=hash, url=mirror_url)97173 | raise Exception("Failed to fetch extension, see above")98 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^99100EXE001 Shebang is present but file is not executable101 --> pkgs/wiki-user-search/wiki-user-search.py:1:1102 |1031 | #!/usr/bin/env python3104 | ^^^^^^^^^^^^^^^^^^^^^^1052 | """1063 | MediaWiki User Search Tool107 |108109Found 27 errors (17 fixed, 10 remaining).110No fixes available (2 hidden fixes can be enabled with the `--unsafe-fixes` option).111112traversed 71 files113emitted 55 files for processing114formatted 52 files (3 changed) in 4.102s115Error: failed to finalise formatting: formatting failures detected