Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|