Commit Graph
112 Commits
Author SHA1 Message Date
Šarūnas Nejus 0b5a5b0350 typing: fix missing types in plugins 2026-08-31 11:27:12 +01:00
Šarūnas Nejus 11d41aee7d typing: add missing types to plugins 2026-08-31 11:27:12 +01:00
Šarūnas Nejus 2971393618 Replace do_query with model-specific logic
This allows to define a proper return type for input_select_objects.
2026-08-27 06:47:39 +01:00
Šarūnas Nejus 01375c7392 typing: fix core annotations 2026-08-22 17:49:49 +01:00
Šarūnas Nejus 914441da16 typing: fix command handlers types 2026-08-21 20:56:38 +01:00
Šarūnas Nejus 6241139600 typing: define explicit optparse.Values for each command 2026-08-19 23:57:05 +01:00
Šarūnas Nejus 14eabc6060 typing: add types to command handlers 2026-08-19 23:57:01 +01:00
Šarūnas Nejus 1969622874 typing: fix types in event handlers 2026-08-18 10:46:33 +01:00
Šarūnas Nejus 5039c8f6cf typing: add types to event handlers 2026-08-18 10:46:33 +01:00
AleksZyro 4fb451f450 Treat null edit values as safe 2026-07-15 14:30:42 +01:00
AleksZyro a6d576d039 Preserve null artpath in edit 2026-07-15 14:30:42 +01:00
Alok Saboo 3ce00617e9 switch the logic ot strip item-only fixed fields 2026-07-13 12:29:55 -04:00
Alok Saboo 210ca09637 ignore item-only fields configured in albumfields 2026-07-12 20:14:11 -04:00
Alok Saboo 55199bf365 harden edit-plugin id matching against duplicate ids and header reordering 2026-07-10 17:52:55 -04:00
Alok Saboo 855434792c refactor code to remove duplication 2026-07-10 08:27:24 -04:00
Alok Saboo c30dd28238 address reviewer comment; match track to items by id 2026-07-10 08:27:24 -04:00
Alok SabooandŠarūnas Nejus ad3497c606 Update beetsplug/edit.py
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
2026-07-10 08:27:24 -04:00
Alok Saboo 64df331deb added type hints 2026-07-10 08:27:24 -04:00
Alok Saboo bf94ae66ef sync branch 2026-07-10 08:27:23 -04:00
Sebastian Mohr 54a2bd20e1 Removed This file is part of beets... headers. 2026-06-29 11:20:15 +02:00
Šarūnas Nejus d53ee774a9 Enable and fix flake8-return 2026-06-09 00:14:06 +01:00
Sebastian Mohr adfb73b66d Run ruff format 2026-05-20 16:53:06 +02:00
Šarūnas Nejus 30ab81eb5b Extract UserError from beets.ui to a new beets.exceptions module.
Update all references in core, plugins, and tests to import UserError
from the new location. This centralizes exception handling and improves
code organization.
2026-05-16 11:18:51 +01:00
Šarūnas Nejus edfe00516f Handle DelimitedString fields as native lists in edit plugin
Treat DelimitedString as a safe YAML-editable type in the edit plugin,
allowing multi-valued fields to be edited as native lists.
2026-02-23 00:33:24 +00:00
Gabriel Push cefb4bfe22 Fix verbose comments and add e,c test 2025-12-09 12:14:03 -05:00
Gabriel Push 03f84eb877 Fix edit plugin cancel flow restoring in-memory tags 2025-12-09 12:14:02 -05:00
Šarūnas Nejus 05430f312c Move PromptChoice to beets.util module
And update imports that have been raising the deprecation warning.
2025-12-02 01:51:14 +00:00
Sebastian Mohr 25ae330044 refactor: moved some more imports that are only used in the commands
in their respective files. Also fixed some imports
2025-11-03 14:03:25 +01:00
Šarūnas Nejus 4a361bd501 Replace format calls with f-strings 2025-08-30 18:42:26 +01:00
Šarūnas Nejus afe97cf31e Do not assign args to query 2025-07-08 11:37:34 +01:00
Šarūnas Nejus 7cada1c9f8 Remove no-op decargs 2025-07-08 11:37:33 +01:00
Sebastian Mohr 68acaa6470 Renamed all action occurrences with Action. 2025-05-13 13:01:46 +02:00
Šarūnas Nejus 85a17ee503 Reformat the codebase 2024-09-21 11:57:48 +01:00
Leet eea7c19abc Use gender-neutral language 2023-10-23 17:41:38 -04:00
Serene-Arc a6e5201ff3 Apply formatting tools to all files
This is 'the big one', which touches every file so that it all conforms
to the given standard.
2023-10-22 09:53:18 +10:00
wisp3rwind a84b3542f9 typing: corrections for dbcore/types.py
tricky...
- the only way I found to express the concept of the "associated type"
  (in Rust lingo) model_type was by making Type generic over its value
  and null types.
- in addition, the class hierarchy of Integer and Float types had to be
  modified, since previously some of them would have conflicting null
  types relative to their super class (this required a change to the
  edit plugin; hopefully no more breakage is caused by these changes)
- don't import the query module, but only the relevant Query's to avoid
  confusing the module query and the class variable query
2023-06-24 11:51:00 +02:00
Andrew Rogl ee4268dabb Remove unused imports
Fix imports
Fix formatting
2021-08-26 20:59:48 +10:00
Andrew Rogl 1ec87a3bdd pyupgrade beetsplug and tests
All tests working
More tidy up to be done
2021-08-26 19:12:51 +10:00
Adrian Sampson 2f5f9ea174 Remove shlex_split utility
This works around a bug that does not exist in Python 3.x, and the
workaround (by calling the underlying shlex.split function with bytes)
was causing crashes on some versions of Python 3. Seemed to work fine on
3.10-dev, though, oddly.
2021-08-19 17:14:16 -04:00
Adrian Sampson 75c41c0546 Remove most six.PY2 checks 2021-08-19 16:45:11 -04:00
Louis Sautier 4d98088cc1 Replace more instances of unsafe calls to yaml.load 2019-04-20 01:14:15 +02:00
wordofglass 7f12cc0c88 edit, Model.copy: documentation improvements 2017-08-25 15:47:07 +02:00
wordofglass 352d99cccd edit: Do not deepcopy objects, finally fixes the regression from #2659
Deepcopying fails if a database is attached as Model._db since the
sqlite connection objects it contains are non-copyable
2017-08-24 15:03:18 +02:00
wordofglass 33f7e67943 edit: Fix a regression from #2659 when re-tagging albums 2017-08-24 13:40:50 +02:00
wordofglass 989845199b edit: Correctly reset the old object, do not reload it from the tags
Previously, if continuing to edit (i.e. invoking the $EDITOR) multiple
times in one invocation of EditPlugin.edit_objects, the plugin would
reload the old state from the file tags. The initial 'old state' is
usually only loaded from the database, though. As a consequence, if
database and tags were not in sync, the diffs from first and all
subsequent edits could differ unexpectedly.
2017-08-24 13:40:35 +02:00
wordofglass df479d686d Fix the edit plugin displaying bogus data or even crashing on re-imports 2017-08-21 00:32:03 +02:00
Johnny Robeson fcbfce3984 replace deprecated log.warn() with log.warning() 2016-08-09 00:33:38 -04:00
Johnny Robeson 47bddb394c decode yaml dumped data as utf-8 in edit plugin for PY2
Yaml doesn't return a true unicode string even with `allow_unicode`
passed to `safe_dump_all`.
2016-08-08 23:59:54 -04:00
Johnny Robeson 303627e44f Read and write edit plugin yaml as utf-8 2016-08-07 06:12:48 -04:00
Johnny Robeson 5b3cd44608 add coding: utf-8 magic comment to every .py file 2016-08-07 04:09:17 -04:00