In zulip/zulip@b998138d3a, we introduce
a check for responses from outgoing webhooks that require them to be
a dictionary. This commit fixes the return value of the botserver view
function to accommodate with the change from the serverside.
In zulip/zulip@3947b0c80a, we replaced
the legacy endpoint to use the term "linkifier" instead of
"filter" and to return the data in a dictionary format.
None of the official clients currently actually use this
endpoint.
When the incrementor attempts to edit a message that was sent long
ago, it will fail and the message will not be updated, nor will a
new message be sent.
Fixes: #673
- Added `**kwargs` typed `object` in the definition of
`Client.call_on_each_*` .
- Replaced `**kwargs` type from `Any` to `object` in the
definition of `Client.register`.
Fixes part of #647
The mirror has some chance of running on Python 3 now, once the
python-zephyr patch is rebased on 0.2.1, though it’s untested.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
Setup gitlint for developers to write well formatted
commit messages.
Note: .gitlint, gitlint-rules.py and lint-commits
are taken directly from zulip/zulip with minor changes.
mypy version 0.770 has a bug where it raises false "syntax error in type
comment" warnings on Python 3.9
https://github.com/python/mypy/issues/8627
It has been fixed.
zulint had a bug where it raised UnicodeDecodeError while running on
Windows, which has been fixed.
14e3974001
The functions `extract_query_without_mention` and
`is_private_message_but_not_group_pm` now accept `BotHandler`
instead of `ExternalBotHandler` which allows passing objects of both
`EmbeddedBotHandler` and `ExternalBotHandler`.
Fixes#639
- The `BotHandler` Protocol is a mypy Protocol
s.t. all BotHandlers can use it as a default type.
- Fix ExternalBotHandler and StubBotHandler to
follow `BotHandler` Protocol
Fixes part of #639
The `BotStorage` Protocol is created to add a common type to all
storage classes.
Note: Protocol is imported from `typing_extensions` as `typing`
doesn't provide Protocol for python <= 3.7.
- Replace virtualenv with python 3's native venv feature. The venv used is native to
python3.5+, so there's no need for a separate dependency.
- Remove redundant activation script. An activation script is required
to use the pip and python in the virtual environment, but because we're
calling the pip inside the venv, we don't need one.
Fixes#625.
The issue linked to this commit suggest suggests to replace the avatar
with the username only, I just needed to remove !avatar as the code
already shows the username.
Fixes part of #632.