]> jfr.im git - irc/weechat/weechat.git/commit
python: Include constant values in python stub
authorTrygve Aaberge <redacted>
Sun, 2 Oct 2022 17:16:00 +0000 (19:16 +0200)
committerSébastien Helleu <redacted>
Sun, 2 Oct 2022 18:25:17 +0000 (20:25 +0200)
commit236d22e364fe14c92b4407954332b3231b8a2b5f
treefc9125ed5ef06384a699b3cd3032aaa2fb079457
parent4d3a3c67aceb9e7ac84094df31a982819e722f73
python: Include constant values in python stub

This is useful for two reasons:

1. When running unit tests for a script weechat needs to be mocked. By
   having the constant values available in the stub file, they can be
   loaded from that, instead of having to define the constants manually
   for the mock.

2. If you log a constant value you have to look up what it means. This
   makes it easier, in the same vein as PR #1824.
doc/python_stub.py
src/plugins/python/weechat.pyi