mirror of
https://github.com/beetbox/beets.git
synced 2025-12-10 10:32:34 +01:00
This was a helper for situations when Python 2 and 3 APIs returned bytes and unicode, respectively. In these situation, we should nowadays know which of the two we receive, so there's no need to wrap & hide the `bytes.decode()` anymore (when it is still required). Detailed justification: beets/ui/__init__.py: - command line options are always parsed to str beets/ui/commands.py: - confuse's config.dump always returns str - open(...) defaults to text mode, read()ing str beetsplug/keyfinder.py: - ... beetsplug/web/__init__.py: - internally, paths are always bytestrings - additionally, I took the liberty to slighlty re-arrange the code: it makes sense to split off the basename first, since we're only interested in the unicode conversion of that part. test/helper.py: - capture_stdout() gives a StringIO, which yields str test/test_ui.py: - self.io, from _common.TestCase, ultimately contains a _common.DummyOut, which appears to be dealing with str (cf. DummyOut.get) |
||
|---|---|---|
| .. | ||
| static | ||
| templates | ||
| __init__.py | ||