Skip to content

Commit f356f50

Browse files
ShimmerGlasssnejus
andauthored
Apply suggestions from code review
Co-authored-by: Šarūnas Nejus <snejus@protonmail.com>
1 parent bc7f8a2 commit f356f50

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

beets/util/config.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,14 @@ def sanitize_choices(
2929
def sanitize_pairs(
3030
pairs: Sequence[tuple[str, str]],
3131
pairs_all: Sequence[tuple[str, str]],
32-
raise_on_unknown=False,
32+
raise_on_unknown: bool=False,
3333
) -> list[tuple[str, str]]:
3434
"""Clean up a single-element mapping configuration attribute as returned
3535
by Confuse's `Pairs` template: keep only two-element tuples present in
3636
pairs_all, remove duplicate elements, expand ('str', '*') and ('*', '*')
3737
wildcards while keeping the original order. Note that ('*', '*') and
3838
('*', 'whatever') have the same effect.
39-
Giving raise_on_unknown=True raises an UnknownPairError when a value in
40-
pairs does not exist in pairs_all.
39+
Set raise_on_unknown to raise an error when a provided pair is not recognised
4140
4241
For example,
4342

0 commit comments

Comments
 (0)