Commit graph

11595 commits

Author SHA1 Message Date
J0J0 Todos
5461ddf9f2 fromfilename: Move <title> regex to the very end
since it's the least significant as discussed in the PR's thread.
2023-01-02 13:29:21 +01:00
J0J0 Todos
2839302d53 fromfilename: Swap regex lines as suggested in #4561 2023-01-02 13:29:21 +01:00
Jack Wilsdon
dad9d2393d Remove Musixmatch from default enabled sources
Musixmatch are currently blocking all requests with the beets user
agent. See #4585.
2022-12-31 14:34:07 +00:00
Jack Wilsdon
2106f471af Add missing placeholders to extlinks captions
Sphinx 6.0.0 changed extlinks to always require placeholders in link
captions. See 93cf1a57d9
2022-12-31 14:23:34 +00:00
wisp3rwind
a6d74686d8 test: separate case_sensitive unit tests from PathQueryTest
- move tests for case_sensitive to test_util.py, since this is not
  really the concern of PathQueryTest
- removes part of the tests, since the tests that patch os.path.samefile
  and os.path.exists are super brittle since they test the
  implementation rather than the functionality of case_sensitive().
  This is a prepartory step for actually changing the implementation,
  which would otherwise break the tests in a confusing way...
2022-12-24 13:36:53 +01:00
wisp3rwind
d24cf69269 remove old Python: remove util.text_string
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)
2022-12-24 13:09:26 +01:00
wisp3rwind
3510e6311d web: slight refactor to make path handling more readable
(at least, more readable to me)
2022-12-24 13:09:26 +01:00
wisp3rwind
35e167f75e remove old Python: in logging, update comments and support new kwargs
We still need these custom Logger modifications, but the precise
reasoning as given in the comments didn't quite apply anymore.
Also, `stack_info` and `stacklevel` arguments have been added in recent
Python, which we now support.
2022-12-24 13:09:26 +01:00
wisp3rwind
7c2aa02de2 remove old Python: in logging, rm workarounds for broken string conversions 2022-12-24 13:09:26 +01:00
wisp3rwind
9f58673433 drop old Python: update a bunch of comments, removing Python 2 details
These didn't match the code anymore (which had already been changes
manually or automatically as part of the 2->3 transition).
2022-12-24 13:09:26 +01:00
wisp3rwind
c816b2953d drop old Python: remove obsolete exception handling for Windows symlinks
when symlinks aren't supported, recent python will only raise
NotImplementedError (or might even support symlinks), ending up in the
other except arm
2022-12-24 13:09:26 +01:00
wisp3rwind
22826c6d36 drop old Python: remove obsolete custom string formatter in hooks plugin 2022-12-24 13:09:26 +01:00
wisp3rwind
67f0c73eec drop old Python: don't handle obsolte exception in keyfinder plugin 2022-12-24 13:09:26 +01:00
wisp3rwind
5cdb0c5c5c drop old Python: rm python 2 leftovers in library.FileOperationError.__str__ 2022-12-24 13:07:48 +01:00
Benedikt
cc7abe3a47
Merge pull request #4591 from wisp3rwind/pr_mypy
Add mypy to tox and CI
2022-12-19 18:08:29 +01:00
Benedikt
3f9dd0acb1
Merge pull request #4586 from wisp3rwind/pr_test_4528
tests: add a (xfailing) test for issue #4528
2022-12-18 09:25:44 +01:00
wisp3rwind
632698680f drop old Python: simplify datetime usage 2022-12-18 09:20:04 +01:00
wisp3rwind
bd09cc90b6 drop Python 3.6: docs, a few safe simplifications 2022-12-18 09:20:04 +01:00
wisp3rwind
f419543f07 docs: remove unused link target, update links to python docs 2022-12-18 09:20:04 +01:00
wisp3rwind
1c7889b0ba tests: add a (failing) test for issue #4528 2022-12-18 09:10:02 +01:00
wisp3rwind
d15c5c4ba2 mypy: ignore_missing_imports = True 2022-12-18 09:09:49 +01:00
wisp3rwind
d604c7e175 add mypy to actions, but allow failure 2022-12-18 09:09:49 +01:00
wisp3rwind
e577838631 add mypy tox environment and dependencies 2022-12-18 09:09:49 +01:00
Benedikt
195ef6c78a
Merge pull request #4593 from wisp3rwind/pr_fix_mediafile_tests
tests: fix assertions for empty MediaFile.images
2022-12-18 08:51:11 +01:00
wisp3rwind
d5f998b312 tests: fix assertions for empty MediaFile.images
used to work due to inconsistent mediafile implementation, but with
https://github.com/beetbox/mediafile/pull/64 (in mediafile >= 0.11.0)
list fields are None if non-existent, not the empty list
2022-12-18 08:41:42 +01:00
Serene-Arc
1950a98da8 Add typing for module 2022-12-16 10:44:31 +10:00
Serene-Arc
5044d13d8d Add typing for module 2022-12-16 10:44:31 +10:00
Serene-Arc
4606ff20ce Add missing typing 2022-12-16 10:44:31 +10:00
Serene-Arc
00c0626e8b Add typing for module 2022-12-16 10:44:31 +10:00
J0J0 Todos
bcc9c93f97 Add docs for #4573 2022-12-06 07:49:36 +01:00
J0J0 Todos
1a4cff2a49 Add changelog for #4573 2022-12-06 07:19:07 +01:00
J0J0 Todos
87ed0f12ea Add --pretend option to splupdate command 2022-12-06 07:03:02 +01:00
Adrian Sampson
d7273bddb3
Merge pull request #4563 from JOJ0/playlist_docs
Improve playlist plugin docs
2022-11-29 16:41:18 -08:00
J0J0 Todos
6b06344662 Further improve playlist plugin docs
Incorporate wording suggestions and add links to query sections.
2022-11-29 08:27:35 +01:00
Adrian Sampson
3077a3a32d
Merge pull request #4564 from beetbox/flake8-config
Fix some CI breakage due to backwards-incompatible flake8 changes
2022-11-28 08:46:28 -08:00
Adrian Sampson
e88745833b
Remove the last from _ import * errors
This was a special case for our `logging` shim that is not truly
necessary.
2022-11-28 08:01:23 -08:00
Adrian Sampson
abc3dfbf42
Reformat flake8 config comments
A recent release of flake8 broke the syntax we were using for comments:
https://github.com/pycqa/flake8/issues/1689#issuecomment-1326319235

It requires comments to be on their own lines.
2022-11-28 07:58:01 -08:00
J0J0 Todos
a23e31d1b6 Improve playlist plugin docs 2022-11-28 16:18:30 +01:00
Adrian Sampson
7cfb55b746
Merge pull request #4546 from luharder/master
Force Tekstowo to check result for match, added Tekstowo test suite
2022-11-26 19:17:19 -08:00
Luke Harder
f155d3ba75 bug 4406 fix v5 (tests pass again) 2022-11-22 20:40:13 -05:00
Luke Harder
4a1f25e1b1 bug 4406 fix v4 (added configurable threshold) 2022-11-22 13:25:09 -05:00
Adrian Sampson
dcba529827
Merge pull request #4549 from Bootjewolf/remixerField
Added remixer field
2022-11-19 12:53:16 -08:00
Bootjewolf
2a282116bd Reorder parameters of _make_track function and fix linting errors 2022-11-19 12:39:16 +01:00
Bootjewolf
1be6c22b44 Generalise the function to get the names of related artists 2022-11-19 12:37:51 +01:00
Adrian Sampson
c83c900f95
Merge pull request #4556 from sweist/fix-from_scratch-documentation
The from_scratch flag is called --from-scratch on the command line
2022-11-18 15:27:20 -08:00
Stefan Schweizer
4f51b4af2b The from_scratch option is called --from-scratch on the command line.
Fixed the documentation.
2022-11-18 16:29:26 +01:00
Bootjewolf
ff22d3dc89 Added changelog entry 2022-11-15 17:52:10 +01:00
Bootjewolf
4918ee6457 Added test for the parsing of the remixer field 2022-11-15 17:42:34 +01:00
Bootjewolf
5f74bf4394 Added the remixer field from musicbrainz 2022-11-15 17:41:49 +01:00
Luke Harder
43f1a8412a bug 4406 fix v3 2022-11-10 14:53:50 -05:00