1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-17 01:22:19 +03:00

ChangeLog: Document back/forwards compatible config.appversion

This commit is contained in:
Athanasius 2021-05-12 09:36:00 +01:00
parent 00f4e00dc8
commit c2f4e4fbda

View File

@ -216,6 +216,17 @@ Plugin Developers
* `config.appversion()` is now a function that returns a `semantic_version.Version`.
In contexts where you're expecting a string this should mostly
just work. If needs be wrap it in `str()`.
For backwards compatibility with pre-5.0.0 you can use:
```python
from config import appversion
if callable(appversion):
edmc_version = appversion()
else:
edmc_version = appversion
```
* Example plugin
[plugintest](https://github.com/EDCD/EDMarketConnector/tree/main/docs/examples/plugintest)