Add new configuration option for mpdstats plugin,
`played_ratio_threshold`, to allow configuring the percentage the song
must be played for it to be counted as played instead of skipped.
## Replace custom assertion methods with standard assertions
This PR is part of `unittest` -> `pytest` migration #5361 and removes
custom assertion methods from the test suite and replaces them with
standard Python assertions.
### Key Changes
- Removed custom assertion methods
- Updated path handling to use `pathlib.Path` wherever this was relevant
to the methods being replaced
- Simplified some of the tests structure
This PR modernizes the codebase by removing Python 2 compatibility code
and simplifying several areas:
- Deleted `BytesQuery` class (replaced with `PathQuery`)
- Removed `decargs()` function that was a no-op in Python 3
- Simplified `print_()` function signature and implementation
- Removed coding-related workarounds in various modules
Currently, `mbcollection` takes the first collection it finds (if the
user does not explicitely indicates one in the configuration).
The problem is that the user may have collections of types that we are
not interested in (e.g. recording collections, artist collections,
etc.).
Since the `get_collections` response returns the collections types, we
can only keep the `release` collections.
Added some more typehints to deezer plugin.
I know, it is properly not used much and we don't even have test for the
deezer plugin but I want to make this a bit more maintainable, mainly to
prepare for https://github.com/beetbox/beets/pull/5787 and make
migration a bit easier.