File tree Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Expand file tree Collapse file tree 4 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ jobs:
107
107
uses : liskin/gh-problem-matcher-wrap@v3
108
108
with :
109
109
linters : mypy
110
- run : poe check-types --show-column-numbers --no-error-summary ${{ needs.changed-files.outputs.changed_python_files }}
110
+ run : poe check-types --show-column-numbers --no-error-summary .
111
111
112
112
docs :
113
113
if : needs.changed-files.outputs.any_docs_changed == 'true'
Original file line number Diff line number Diff line change @@ -92,6 +92,10 @@ For plugin developers:
92
92
93
93
Old imports are now deprecated and will be removed in version ``3.0.0 ``.
94
94
* ``beets.ui.decargs `` is deprecated and will be removed in version ``3.0.0 ``.
95
+ * Beets is now pep 561 compliant, which means that it provides type hints
96
+ for all public APIs. This allows IDEs to provide better autocompletion and
97
+ type checking for downstream users of the beets API.
98
+
95
99
96
100
Other changes:
97
101
Original file line number Diff line number Diff line change 25
25
from beets import dbcore
26
26
from beets .library import LibModel
27
27
from beets .test import _common
28
+ from beets .util import cached_classproperty
28
29
29
30
# Fixture: concrete database and model classes. For migration tests, we
30
31
# have multiple models with different numbers of fields.
@@ -53,15 +54,22 @@ class ModelFixture1(LibModel):
53
54
"field_one" : dbcore .types .INTEGER ,
54
55
"field_two" : dbcore .types .STRING ,
55
56
}
56
- _types = {
57
- "some_float_field" : dbcore .types .FLOAT ,
58
- }
57
+
59
58
_sorts = {
60
59
"some_sort" : SortFixture ,
61
60
}
62
- _queries = {
63
- "some_query" : QueryFixture ,
64
- }
61
+
62
+ @cached_classproperty
63
+ def _types (cls ):
64
+ return {
65
+ "some_float_field" : dbcore .types .FLOAT ,
66
+ }
67
+
68
+ @cached_classproperty
69
+ def _queries (cls ):
70
+ return {
71
+ "some_query" : QueryFixture ,
72
+ }
65
73
66
74
@classmethod
67
75
def _getters (cls ):
You can’t perform that action at this time.
0 commit comments