Repository: beetbox/beets (branch: lb)
Commit date: 2023-12-22T21:12:42Z

Workflow file: .github/workflows/formatting_check.yml (Check code formatting)
name: formatting_check
run-name: Check code formatting
on: [push, pull_request]
jobs:
  formatting_check:
    runs-on: ubuntu-latest
    services:
      pypi_wayback:
        image: ghcr.io/waleko/pypi-wayback
        ports:
          - 8629:8080
    steps:
      - name: Install dependencies
        uses: actions/checkout@v3

      - name: Run formatting check
        uses: paolorechia/pox@v1.0.1
        with:
          tox_env: "format_check"

env:
  PIP_INDEX_URL: http://localhost:8629/2023-12-22
  UV_INDEX_URL: http://localhost:8629/2023-12-22


Failed build logs:
step_name: formatting_check/3_Run formatting check.txt
log: ##[group]Run paolorechia/pox@v1.0.1
with:
  tox_env: format_check
##[endgroup]
stdout: Defaulting to user installation because normal site-packages is not writeable

stdout: Collecting tox

stdout:   Downloading tox-4.11.4-py3-none-any.whl (153 kB)

stdout:      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 154.0/154.0 KB 4.6 MB/s eta 0:00:00
stdout: 

stdout: Collecting pyproject-api>=1.6.1

stdout:   Downloading pyproject_api-1.6.1-py3-none-any.whl (12 kB)

stdout: Collecting cachetools>=5.3.1

stdout:   Downloading cachetools-5.3.2-py3-none-any.whl (9.3 kB)

stdout: Requirement already satisfied: tomli>=2.0.1 in /usr/local/lib/python3.10/dist-packages (from tox) (2.0.1)

stdout: Collecting pluggy>=1.3

stdout:   Downloading pluggy-1.3.0-py3-none-any.whl (18 kB)

stdout: Collecting colorama>=0.4.6

stdout:   Downloading colorama-0.4.6-py2.py3-none-any.whl (25 kB)

stdout: Collecting chardet>=5.2

stdout:   Downloading chardet-5.2.0-py3-none-any.whl (199 kB)

stdout:      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 199.4/199.4 KB 22.3 MB/s eta 0:00:00
stdout: 

stdout: Requirement already satisfied: platformdirs>=3.10 in /usr/local/lib/python3.10/dist-packages (from tox) (4.1.0)

stdout: Collecting filelock>=3.12.3

stdout:   Downloading filelock-3.13.1-py3-none-any.whl (11 kB)

stdout: Collecting virtualenv>=20.24.3

stdout:   Downloading virtualenv-20.25.0-py3-none-any.whl (3.8 MB)

stdout:      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.8/3.8 MB 45.9 MB/s eta 0:00:00
stdout: 

stdout: Requirement already satisfied: packaging>=23.1 in /usr/local/lib/python3.10/dist-packages (from tox) (23.2)

stdout: Collecting distlib<1,>=0.3.7

stdout:   Downloading distlib-0.3.8-py2.py3-none-any.whl (468 kB)

stdout:      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 468.9/468.9 KB 27.6 MB/s eta 0:00:00
stdout: 

stdout: Installing collected packages: distlib, pyproject-api, pluggy, filelock, colorama, chardet, cachetools, virtualenv, tox

stdout: Successfully installed cachetools-5.3.2 chardet-5.2.0 colorama-0.4.6 distlib-0.3.8 filelock-3.13.1 pluggy-1.3.0 pyproject-api-1.6.1 tox-4.11.4 virtualenv-20.25.0

Received 6565789 of 6565789 (100.0%), 72.8 MBs/sec
Cache Size: ~6 MB (6565789 B)
[command]/usr/bin/tar -z -xf /home/runner/work/_temp/bd9f7584-4a40-4ffd-8076-eb2de008007e/cache.tgz -P -C /home/runner/work/beets/beets
Cache restored successfully
Hit cache on tox
stdout: format_check: recreate env because python changed virtualenv version='20.24.5'->'20.25.0'

stdout: format_check: remove tox env folder /home/runner/work/beets/beets/.tox/format_check

stdout: format_check: install_deps> python -I -m pip install black isort

stdout: format_check: commands[0]> isort beets beetsplug test --check

stdout: format_check: commands[1]> black beets beetsplug test --check

stderr: would reformat /home/runner/work/beets/beets/beetsplug/listenbrainz.py

stderr: 
Oh no! 💥 💔 💥
1 file would be reformatted, 186 files would be left unchanged.

stdout: format_check: exit 1 (4.15 seconds) /home/runner/work/beets/beets> black beets beetsplug test --check pid=1777

stdout:   format_check: FAIL code 1 (7.74=setup[3.02]+cmd[0.56,4.15] seconds)
  evaluation failed :( (7.80 seconds)

child process exited with code 1
##[warning]The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
##[error]Tox failed


Changed files:
beetsplug/listenbrainz.py

Fix diff:
diff --git a/beetsplug/listenbrainz.py b/beetsplug/listenbrainz.py
index 11ef71597..3127237ee 100644
--- a/beetsplug/listenbrainz.py
+++ b/beetsplug/listenbrainz.py
@@ -150,6 +150,7 @@ class ListenBrainzPlugin(BeetsPlugin):
     def get_listenbrainz_playlists(self):
         """Returns a list of playlists created by ListenBrainz."""
         import re
+
         resp = self.get_playlists_createdfor(self.username)
         playlists = resp.get("playlists")
         listenbrainz_playlists = []
@@ -158,7 +159,9 @@ class ListenBrainzPlugin(BeetsPlugin):
             playlist_info = playlist.get("playlist")
             if playlist_info.get("creator") == "listenbrainz":
                 title = playlist_info.get("title")
-                match = re.search(r"(Missed Recordings of \d{4}|Discoveries of \d{4})", title)
+                match = re.search(
+                    r"(Missed Recordings of \d{4}|Discoveries of \d{4})", title
+                )
                 if "Exploration" in title:
                     playlist_type = "Exploration"
                 elif "Jams" in title:
@@ -178,7 +181,7 @@ class ListenBrainzPlugin(BeetsPlugin):
                 id = identifier.split("/")[-1]
                 if playlist_type in ["Jams", "Exploration"]:
                     listenbrainz_playlists.append(
-                    {"type": playlist_type, "date": date, "identifier": id}
+                        {"type": playlist_type, "date": date, "identifier": id}
                     )
         return listenbrainz_playlists