1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-13 15:57:14 +03:00

PLUGINS.md: Emphasise limited use of from config import config

This commit is contained in:
Athanasius 2022-12-01 12:14:49 +00:00
parent 41d7af54b4
commit b06e579754
No known key found for this signature in database
GPG Key ID: 772697E181BB2767

View File

@ -83,7 +83,18 @@ breaking with future code changes.**
match the main UI.
`from config import appname, applongname, appcmdname, appversion
, copyright, config` - to access config.
, copyright, config` - to access config. *Intended use of config classes
and functions is **only** for managing a plugin's own configuration*.
Explicitly you can expect to use:
- `config.set()` - to store a plugin configuration value.
- `config.get_list()`, `config.get_str()`, `config.get_bool()`,
`config.get_int()` - To retrieve a plugin configuration value.
- `config.delete()` - To remove a plugin configuration value.
- `config.shutting_down` (NB: a property, not a function!) to detect if the application
is currently shutting down.
Anything else from `import config` is not part of the stable plugin API and
liable to change without notice.
`from prefs import prefsVersion` - to allow for versioned preferences.