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.
- Call `super()` in the init method.
- Change return hashlib.md5 syntax to encode properly for Python 3
Signed-off-by: Manu LN <manu+github@lacavernedemanu.fr>
Adds the method move_topic to the class Client that allows moving
topics between streams.
- The topic can be renamed if the new_topic argument is given
- Partial topic can be moved givent the proper message_id and
propagate_mode arguments.
- notification to old/new stream can be silenced (active by default)