Commit e445831
committed
Fix edge-case in preprocess_data, if label_namer is optional and unset.
9728144 removed a call to `BoundArguments.apply_defaults` to guard
against an API change in Py3.9. As it turns out this means that
`all_kwargs[label_namer]` can now fail, in theory, if _preprocess_data
is used on a function for which label_namer is an *optional* parameter
(because the default won't be set in all_kwargs). Fortunately, 1) there
is no such case (it would be semantically questionable to derive the
label from a non-required argument...) and 2) the fix is simple (use
`all_kwargs.get` instead -- _label_namer properly handles None).1 parent 70d59ae commit e445831
1 file changed
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1405 | 1405 | | |
1406 | 1406 | | |
1407 | 1407 | | |
1408 | | - | |
1409 | | - | |
1410 | 1408 | | |
1411 | | - | |
| 1409 | + | |
1412 | 1410 | | |
1413 | 1411 | | |
1414 | 1412 | | |
| |||
0 commit comments