summaryrefslogtreecommitdiff
path: root/doc/python_stub.py
AgeCommit message (Collapse)Author
2023-08-24Add compatibility with Python < 3.10 in weechat.pyiTrygve Aaberge
The | syntax for unions is only supported in Python 3.10 and later. Since Python 3.8 and 3.9 are still supported upstream for a while and we had a user reporting on IRC that they couldn't use the stub file since they are using 3.8, change to the old syntax for unions to support this. There aren't really any drawbacks of this. It's just a bit more verbose, and a typing import is necessary, but neither of those really matters in a generated stub file.
2023-06-05doc: fix URLs to WeeChat docsSébastien Helleu
2023-01-01core: update copyright datesSébastien Helleu
2022-10-09python: Include script examples in function docstringTrygve Aaberge
This makes it possible to see how functions are used without having to go to the web page. It's especially useful to see the types of the callback functions.
2022-10-02python: Include constant values in python stubTrygve Aaberge
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.
2022-08-03doc: fix pylint errorsSébastien Helleu
2022-06-24doc: fix generation of python stubSébastien Helleu
2022-06-18doc: add trailing slashes in URLsSébastien Helleu
2022-03-17core: fix line too longSébastien Helleu
2022-03-17core: Fix regex for constants in the Python stub generatorTrygve Aaberge
In Python raw strings, newlines can't be escaped with a backslash. If you do that, both the backslash and the newline become part of the string. This meant that the regex for constants both started and ended with a newline which caused every other constant to be skipped.
2022-01-17core: update copyright datesSébastien Helleu
2021-08-16doc: write python stub on standard outputSébastien Helleu
2021-05-20doc: format script with blackSébastien Helleu
2021-05-14core: add generator and Python stub file for WeeChat API (issue #1377)Sébastien Helleu