Repository navigation
Commit c79f736
authored
fix(group): apply config when require_array returns an existing array (#4413)
* fix(group): apply config when require_array returns an existing array
require_array forwarded **kwargs, including config, only to create_array
in the branch that creates a missing array. Requiring an existing array
dropped config and returned it with the global defaults. Apply it with
with_config(), as open_array does since #4408.
Assisted-by: ClaudeCode:claude-opus-5-5
* docs(changes): add fragment for #4413
Assisted-by: ClaudeCode:claude-opus-5-5
* refactor(group): make config a named parameter of require_array
config was read from **kwargs, which is how the existing-array branch
came to drop it. It is now a named parameter of Group.require_array and
AsyncGroup.require_array, passed explicitly to create_array for a new
array and applied with with_config() to an existing one. The existing
array comes from getitem, which serves member lookup in general
(including consolidated metadata) and takes no runtime config.
Assisted-by: ClaudeCode:claude-opus-5-5
* fix(group): parse config the same way on both require_array branches
The existing-array branch handed config to with_config, which merged
it over the array's current config and rejected an unknown key with the
dataclass's "unexpected keyword argument" message. The create branch
went through parse_array_config, which fills missing keys from the
global configuration and says "Unknown array config keys". The same bad
input now raises the same error whichever branch runs, and the docstring's
"taken from the global configuration" holds by construction.
The error tests run on both branches, and the combinations test passes
config=None explicitly instead of omitting the keyword.
Assisted-by: ClaudeCode:claude-fable-5-11 parent 9e631c6 commit c79f736
3 files changed
Lines changed: 98 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
1240 | 1241 | | |
1241 | 1242 | | |
1242 | 1243 | | |
| 1244 | + | |
1243 | 1245 | | |
1244 | 1246 | | |
1245 | 1247 | | |
| |||
1258 | 1260 | | |
1259 | 1261 | | |
1260 | 1262 | | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
1261 | 1266 | | |
1262 | 1267 | | |
1263 | 1268 | | |
| |||
1284 | 1289 | | |
1285 | 1290 | | |
1286 | 1291 | | |
1287 | | - | |
| 1292 | + | |
1288 | 1293 | | |
| 1294 | + | |
| 1295 | + | |
| 1296 | + | |
| 1297 | + | |
| 1298 | + | |
1289 | 1299 | | |
1290 | 1300 | | |
1291 | 1301 | | |
| |||
2837 | 2847 | | |
2838 | 2848 | | |
2839 | 2849 | | |
2840 | | - | |
| 2850 | + | |
| 2851 | + | |
| 2852 | + | |
| 2853 | + | |
| 2854 | + | |
| 2855 | + | |
| 2856 | + | |
| 2857 | + | |
2841 | 2858 | | |
2842 | 2859 | | |
2843 | 2860 | | |
| |||
2846 | 2863 | | |
2847 | 2864 | | |
2848 | 2865 | | |
| 2866 | + | |
| 2867 | + | |
| 2868 | + | |
2849 | 2869 | | |
2850 | 2870 | | |
2851 | 2871 | | |
2852 | 2872 | | |
2853 | 2873 | | |
2854 | 2874 | | |
2855 | 2875 | | |
2856 | | - | |
| 2876 | + | |
| 2877 | + | |
| 2878 | + | |
2857 | 2879 | | |
2858 | 2880 | | |
2859 | 2881 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
62 | 63 | | |
63 | 64 | | |
64 | 65 | | |
| 66 | + | |
65 | 67 | | |
66 | 68 | | |
67 | 69 | | |
| |||
1467 | 1469 | | |
1468 | 1470 | | |
1469 | 1471 | | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
| 1475 | + | |
| 1476 | + | |
| 1477 | + | |
| 1478 | + | |
| 1479 | + | |
| 1480 | + | |
| 1481 | + | |
| 1482 | + | |
| 1483 | + | |
| 1484 | + | |
| 1485 | + | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
| 1489 | + | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
| 1493 | + | |
| 1494 | + | |
| 1495 | + | |
| 1496 | + | |
| 1497 | + | |
| 1498 | + | |
| 1499 | + | |
| 1500 | + | |
| 1501 | + | |
| 1502 | + | |
| 1503 | + | |
| 1504 | + | |
| 1505 | + | |
| 1506 | + | |
| 1507 | + | |
| 1508 | + | |
| 1509 | + | |
| 1510 | + | |
| 1511 | + | |
| 1512 | + | |
| 1513 | + | |
| 1514 | + | |
| 1515 | + | |
| 1516 | + | |
| 1517 | + | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
| 1535 | + | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
1470 | 1542 | | |
1471 | 1543 | | |
1472 | 1544 | | |
| |||
0 commit comments