Commit graph

17 commits

Author SHA1 Message Date
Anders Kaseorg
8fc924cd12 ruff: Fix B904 raise exceptions with raise ... from err.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-11-01 20:27:32 -07:00
Anders Kaseorg
54263e5d52 ruff: Fix N818 Exception name should be named with an Error suffix.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-30 11:44:10 -07:00
Anders Kaseorg
88ab78ee25 ruff: Fix RSE102 Unnecessary parentheses on raised exception.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-28 16:17:21 -07:00
Anders Kaseorg
a9607dfdf9 Convert type comments to Python ≥ 3.6 variable annotations.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-18 01:04:47 -07:00
PIG208
6f3f9bf7e4 black: Reformat without skipping string normalization. 2021-06-02 18:45:57 -07:00
PIG208
fba21bb00d black: Reformat skipping string normalization. 2021-06-02 18:45:57 -07:00
PIG208
5580c68ae5 isort: Reformat using isort. 2021-06-02 18:45:57 -07:00
LoopThrough-i-j
1fb3d529a9 zulip-bots: Set bot_handler type to BotHandler.
- Set `bot_handler` type to `BotHandler`.
- Fix mypy issues in improperly typed variables, params and returns.

Fixes part of #639
2021-03-03 13:31:50 -08:00
Anders Kaseorg
17cf26aa1f cleanup: Move line breaks before binary operators.
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
2f6623bbc4 cleanup: Remove unused imports.
Generated by autoflake.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
e30b3b094b Modernize legacy Python 2 syntax with pyupgrade.
Generated by `pyupgrade --py3-plus --keep-percent-format` followed by
manual indentation fixes.

Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 15:04:36 -07:00
neiljp (Neil Pilgrim)
4e19a7716d mypy: Avoid 'Any' for message in bots.
Also remove a few unnecessary typing imports.
2018-05-30 07:11:16 -04:00
Robert Hönig
f4ee3d4009 Fix mypy errors. 2018-01-04 17:19:02 +01:00
Robert Hönig
bed2c6c9ea mention bot: Quit on invalid API key. 2018-01-04 10:34:16 -05:00
Viraat Chandra
5ccbe6e6bd zulip_bots: Reformat code for Mention Bot file mention.py. 2017-12-30 17:51:10 +01:00
Viraat Chandra
adbda6d2f2 zulip_bots: Check Access Token on initialization for Mention bot. 2017-12-30 17:51:10 +01:00
Viraat Chandra
a2557ccbe6 interactive bots: Create Mention bot. 2017-12-28 16:33:00 -05:00