Steps to replicate the issue (include links if applicable):
What happens?:
black: find interpreter for spec PythonSpec(path=/opt/hostedtoolcache/Python/3.8.18/x64/bin/python)
black: proposed PythonInfo(spec=CPython3.8.18.final.0-64, exe=/opt/hostedtoolcache/Python/3.8.18/x64/bin/python, platform=linux, version='3.8.18 (default, Aug 28 2023, 08:27:22) \n[GCC 11.4.0]', encoding_fs_io=utf-8-utf-8)
black: create virtual environment via CPython3Posix(dest=/home/runner/work/refill/refill/.tox/black, clear=False, no_vcs_ignore=False, global=False)
black: add seed packages via FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/runner/.local/share/virtualenv)
black: add activators for Bash, CShell, Fish, Nushell, PowerShell, Python
black: install_deps> python -I -m pip install black
black: exit 0 (1.90 seconds) /home/runner/work/refill/refill> python -I -m pip install black pid=18black: freeze> python -m pip freeze --all
black: exit 0 (0.30 seconds) /home/runner/work/refill/refill> python -m pip freeze --all pid=18black: black==24.4.2,click==8.1.7,mypy-extensions==1.0.0,packaging==24.0,pathspec==0.12.1,pip==24.0,platformdirs==4.2.2,setuptools==69.5.1,tomli==2.0.1,typing_extensions==4.12.0,wheel==0.43.0
black: commands[0]> black --check --diff backend
--- /home/runner/work/refill/refill/backend/refill/dataparsers/parsespecial.py 2024-05-30 12:33:39.083116+00:+++ /home/runner/work/refill/refill/backend/refill/dataparsers/parsespecial.py 2024-05-30 12:34:07.334062+00:@@ -31,13 +31,13 @@
},
would reformat /home/runner/work/refill/refill/backend/refill/dataparsers/parsespecial.py
"type": {
"element": lambda e: e.name == "aside"
and "block" in e.get("class", [])
and e.findChildren("img"),
- "value": lambda e: "radioBroadcast"
- if "radio" in e.text
- else "tvBroadcast",
+ "value": lambda e: (
+ "radioBroadcast" if "radio" in e.text else "tvBroadcast"
+ ),
},
},
},
]
--- /home/runner/work/refill/refill/backend/refill/utils/__init__.py 2024-05-30 12:33:39.083116+00:+++ /home/runner/work/refill/refill/backend/refill/utils/__init__.py 2024-05-30 12:34:07.422189+00:@@ -1,13 +1,13 @@
import functools
import requests as _requests
would reformat /home/runner/work/refill/refill/backend/refill/utils/__init__.py
session = _requests.Session()
-session.headers[
- "User-Agent"
-] = "reFill/2 (https://en.wikipedia.org/wiki/User:Zhaofeng_Li/reFill)"
+session.headers["User-Agent"] = (
+ "reFill/2 (https://en.wikipedia.org/wiki/User:Zhaofeng_Li/reFill)"
+)
# Ugly hack to set default timeouts
# https://stackoverflow.com/a/558418 for method in ("get", "options", "head", "post", "put", "patch", "delete"):
setattr(
Oh no! 💥 💔 💥
2 files would be reformatted, 46 files would be left unchanged.
black: exit 1 (0.46 seconds) /home/runner/work/refill/refill> black --check --diff backend pid=18black: FAIL ✖ in 2.79 secondsWhat should have happened instead?:
- tests pass
Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):
Other information (browser name/version, screenshots, etc.):

