Overview
Comment: | introduce ConfigList() for config: key access |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
fec593dcbd35b8c2eab70f00ef9195bf |
User & Date: | mario on 2022-10-28 22:31:52 |
Other Links: | manifest | tags |
Context
2022-10-28
| ||
22:40 | add some vague permissive: score for modules (error tolerancy/ignorance) check-in: d8df8b1ba2 user: mario tags: trunk | |
22:31 | introduce ConfigList() for config: key access check-in: fec593dcbd user: mario tags: trunk | |
21:59 | update docs check-in: 33c3bc16bb user: mario tags: trunk | |
Changes
Modified pluginconf/__init__.py from [40c0c39483] to [f4eabf5fc1].
︙ | |||
368 369 370 371 372 373 374 | 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 | - - + + - - - + + + + + - - - + + + + + + + + + + + + + + + | for field in rx.keyval.findall(src): meta[field[0].replace("-", "_").lower()] = field[1].strip() meta["config"] = plugin_meta_config(meta.get("config") or "") return PluginMeta(meta) |
︙ | |||
425 426 427 428 429 430 431 | 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 | - + + | opt[field[0]] = (field[1] or field[2] or field[3] or "").strip() # normalize type opt["type"] = config_opt_type_map.get(opt["type"], opt["type"] or "str") # preparse select: if opt.get("select"): opt["select"] = config_opt_parse_select(opt.get("select", "")) config.append(opt) |
︙ |
Modified pluginconf/gui.py from [faa74dfb1b] to [70ac617c4f].
︙ | |||
72 73 74 75 76 77 78 | 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 | + - + | ------- True : if changed config{} values are to be saved (the dict will be updated in any case) """ plugins = kwargs.get("plugins", {}) opt_label = kwargs.get("opt_label", False) theme = kwargs.get("theme", "DefaultNoMoreNagging") if theme: if "theme" in kwargs: |
︙ |
Modified test/basic.py from [268d6cd46f] to [1fde260c36].
︙ | |||
9 10 11 12 13 14 15 | 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - + - + - - + + - + | import pytest import pluginconf @pytest.fixture def pmd(): return pluginconf.plugin_meta(fn=__file__) |
Added test/config_listwrapper.py version [c695b3e4ba].
|