Commit b8cd2d5
committed
Fix ArtistInspector.get_aliases.
The docstring parsing in get_aliases was brittle and didn't handle the
final dot that cbook._define_aliases added to the docstring, so as of
master it would return the keys with an additional dot. Instead, use a
regex which will loudly error out if the format is incorrect.
Also replace {key: None, ...} mapping simulating a set to, well, a set.
(The use of sets instead of lists was added in ed9c2b5 apparently to
handle the case where the same alias is added twice.)
(Yes, the whole alias machinery could now be simplified e.g. by adding
an `is_mpl_alias` attribute on the aliases instead.)1 parent 248399e commit b8cd2d5
3 files changed
Lines changed: 20 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1189 | 1189 | | |
1190 | 1190 | | |
1191 | 1191 | | |
1192 | | - | |
1193 | | - | |
| 1192 | + | |
| 1193 | + | |
1194 | 1194 | | |
1195 | 1195 | | |
1196 | 1196 | | |
1197 | | - | |
1198 | | - | |
| 1197 | + | |
| 1198 | + | |
1199 | 1199 | | |
1200 | | - | |
1201 | 1200 | | |
1202 | 1201 | | |
1203 | 1202 | | |
| |||
1207 | 1206 | | |
1208 | 1207 | | |
1209 | 1208 | | |
1210 | | - | |
1211 | | - | |
1212 | | - | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
1213 | 1212 | | |
1214 | 1213 | | |
1215 | 1214 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
| 33 | + | |
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| |||
0 commit comments