Skip to content

Replace Likelies with a frozen dataclass - #6934

Open
aribradshaw wants to merge 1 commit into
beetbox:masterfrom
aribradshaw:agent/refactor-likelies-dataclass
Open

Replace Likelies with a frozen dataclass#6934
aribradshaw wants to merge 1 commit into
beetbox:masterfrom
aribradshaw:agent/refactor-likelies-dataclass

Conversation

@aribradshaw

Copy link
Copy Markdown

Description

Fixes #6920.

Replace the fixed-schema Likelies AttrDict with a frozen dataclass and construct album and singleton metadata explicitly. Album import metadata is converted to a detached dictionary at the task boundary, while singleton ASIS and RETAG tasks continue to preserve flexible item fields.

The refactor makes the fixed fields and immutability explicit without leaking a mutable internal metadata object to importer consumers.

To Do

  • Documentation. No public interface or command-line behavior changed.
  • Changelog.
  • Tests.

Validation

  • ruff check on all changed Python files
  • ruff format --check on all changed Python files
  • 10 focused regression and plurality tests passed
  • A broader related-file run produced 219 passes and 10 skips. Three existing Windows-specific extension-recognition tests failed independently of this change.

@aribradshaw
aribradshaw marked this pull request as ready for review August 18, 2026 00:18
@aribradshaw
aribradshaw requested a review from a team as a code owner August 18, 2026 00:18
@codecov

codecov Bot commented Aug 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.07%. Comparing base (5406ed7) to head (c54703a).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #6934   +/-   ##
=======================================
  Coverage   76.06%   76.07%           
=======================================
  Files         163      163           
  Lines       21146    21152    +6     
  Branches     3334     3335    +1     
=======================================
+ Hits        16085    16091    +6     
  Misses       4273     4273           
  Partials      788      788           
Files with missing lines Coverage Δ
beets/autotag/source.py 100.00% <ø> (ø)
beets/importer/tasks.py 91.07% <100.00%> (+0.05%) ⬆️
beets/util/__init__.py 81.75% <100.00%> (+0.06%) ⬆️
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Replace Likelies AttrDict with a frozen dataclass

1 participant