nixbot

builds
1tribuchet: building on jamie2treefmt v2.5.0ERRO formatter | ruff-check: failed to apply with options '[check --fix]': exit status 134PIE810 Call `startswith` once with a `tuple`5 --> checks/linkcheck/main.py:49:126 |747 | continue848 |949 | if title.startswith("User:") or title.startswith("Talk:"):10 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^1150 | root.remove(page)1251 | continue13 |14help: Merge into a single `startswith` call1516EXE005 Shebang should be at the beginning of the file17 --> modules/nixos-wiki/update-extensions.py:2:118 |191 | #!/usr/bin/env nix-shell202 | #!nix-shell -i python3 -p nixfmt-rfc-style python3 python3Packages.requests python3Packages.beautifulsoup4 gh21 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^223 | import json234 | import os24 |2526TRY002 Create your own exception27 --> modules/nixos-wiki/update-extensions.py:34:1528 |2932 | content = soup.find(id="mw-content-text")3033 | if content and "does not exist" in content.get_text():3134 | raise Exception(32 | _______________^3335 | | f"Extension '{extension_name}' does not exist for MediaWiki version REL{mediawiki_version}"3436 | | )35 | |_________^3637 |3738 | # Look for download links - the class is now a list ['external', 'free']38 |3940TRY002 Create your own exception41 --> modules/nixos-wiki/update-extensions.py:47:1142 |4345 | return urllib.parse.urlparse(href)4446 |4547 | raise Exception(46 | ___________^4748 | | f"Could not find download URL for extension '{extension_name}' version REL{mediawiki_version}"4849 | | )49 | |_____^5051FURB122 Use of `f.write` in a for loop52 --> modules/nixos-wiki/update-extensions.py:73:1353 |5471 | r.raise_for_status()5572 | with open(local_filename, "wb") as f:5673 | / for chunk in r.iter_content(chunk_size=8192):5774 | | # If you have chunk encoded response uncomment if5875 | | # and set chunk_size parameter to None.5976 | | # if chunk:6077 | | f.write(chunk)61 | |______________________________^6278 | return local_filename63 |64help: Replace with `f.writelines`6566TRY002 Create your own exception67 --> modules/nixos-wiki/update-extensions.py:116:1968 |69114 | data = response.json()70115 | if not data:71116 | raise Exception(f"No tags found for {repo}")72 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^73117 | latest_tag = data[0]["name"]74118 | return f"https://github.com/{repo}/archive/refs/tags/{latest_tag}.zip"75 |7677TRY002 Create your own exception78 --> modules/nixos-wiki/update-extensions.py:120:1579 |80118 | return f"https://github.com/{repo}/archive/refs/tags/{latest_tag}.zip"81119 | else:82120 | raise Exception(f"Unknown extension type: {extension_type}")83 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^8485TRY002 Create your own exception86 --> modules/nixos-wiki/update-extensions.py:144:1187 |88142 | else:89143 | return Extension(name=extension_name, hash=hash, url=download_url)90144 | raise Exception("Failed to fetch extension, see above")91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^9293TRY002 Create your own exception94 --> modules/nixos-wiki/update-extensions.py:173:1195 |96171 | else:97172 | return Extension(name=extension_name, hash=hash, url=mirror_url)98173 | raise Exception("Failed to fetch extension, see above")99 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^100101EXE001 Shebang is present but file is not executable102 --> pkgs/wiki-user-search/wiki-user-search.py:1:1103 |1041 | #!/usr/bin/env python3105 | ^^^^^^^^^^^^^^^^^^^^^^1062 | """1073 | MediaWiki User Search Tool108 |109110Found 27 errors (17 fixed, 10 remaining).111No fixes available (2 hidden fixes can be enabled with the `--unsafe-fixes` option).112113traversed 71 files114emitted 55 files for processing115formatted 52 files (2 changed) in 415ms116Error: failed to finalise formatting: formatting failures detected