beetbox / beetbox/beets

duplicates: Overhaul commandline options handling

Open
#5,855 0 comments 0 reactions 0 assignees View on GitHub
duplicates needinfo
Dominant language
Python
Stars
15.7k
Forks
2.1k
Avg merge
4d 21h
Merged PRs (30d)
31

Description

We noticed possible bugs caused by incomplete command line argument handling. A refactoring and better testing of the duplicates plugin would be in order.

Original post:
...

It looks a bit like the plugin still isn't properly handling conflicting action options (what happens if `--delete` and `--tag` are given? Calling `item.store()` after `item.remove()` looks a little concerning). Probably, (some) actions should be made exclusive (at least upon executing them, maybe also warning the user about it).

...

_Originally posted by @wisp3rwind in https://github.com/beetbox/beets/pull/5832#pullrequestreview-2984843935_

Contributor guide

Open the contributing guide

Research direction

Start by tracing the duplicates plugin's command-line option handling and how the --delete and --tag actions are executed. Add focused tests for conflicting action options and define completion by ensuring those combinations are handled consistently without invalid follow-up operations.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.