PIG208
a87303beb1
zulip_botserver: Fix path finding for external bots.
...
The previous implementation to locate the `bot_dir` is unfortunately
wrong as it doesn't work with the external custom bots.
2021-07-22 11:14:52 +08:00
PIG208
9ce7c52a10
pyupgrade: Reformat with --py36-plus.
...
This includes mainly fixes of string literals using f-strings or
.format(...), as well as unpacking of list comprehensions.
2021-06-02 18:45:57 -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
Eeshan Garg
63fefd2a0f
pypi: Release version 0.8.0.
2021-05-19 22:44:45 -02:30
LoopThrough-i-j
dda9e0a638
botserver: Fix mypy error.
...
Value of type "Optional[Any]" is not indexable error
was originated in PR #682 . This is due to request in Flask 2.0.
2021-05-12 15:17:52 -07:00
PIG208
5b32b32914
botserver: Return a valid JSON that is acceptable to outgoing webhooks.
...
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.
2021-05-11 09:08:04 -07:00
Anders Kaseorg
19f5b4f6a6
mypy: Fix exec_module type: ignore comments.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-10 09:58:18 -08:00
Anders Kaseorg
30f241a126
mypy: Remove unused type: ignore comments.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2021-03-04 15:09:58 -08:00
Ganesh Pawar
44b6fd395a
tests: Fix tests failing on Windows.
...
Tests were failing on Windows since paths are case-insensitive on it.
This uses pathlib library to compare paths on all platforms.
Fixes #651
2021-03-04 11:28:35 -08: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
LoopThrough-i-j
3887ad102e
python-zulip-api: Drop python3.5 support.
...
Fixes Part of #655
2021-02-26 07:32:47 -08:00
Alex Vandiver
385fb51f01
zulip-botserver: Document use of environment var in README.md
2021-01-07 00:31:26 -08:00
LoopThrough-i-j
bcf183d2b1
zulip-botserver: Allow passing config via JSON formatted environment variable.
...
Fixes #485 .
Co-authored-by: Alex Vandiver <alexmv@zulip.com>
2021-01-07 00:31:26 -08:00
Eeshan Garg
befbb953dd
pypi: Release version 0.7.1.
2020-10-09 15:50:43 -02:30
Anders Kaseorg
5f81eb3a70
Update zulipchat.com links to zulip.com.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2020-06-11 21:06:58 -07:00
neiljp (Neil Pilgrim)
540d453237
setup.py: Add Source & Documentation project_urls.
...
The only existing url points to zulip.org -> zulipchat.com
2020-05-05 09:20:50 -04:00
Eeshan Garg
1dac75f979
pypi: Release version 0.7.0.
2020-04-20 23:23:58 -02:30
Anders Kaseorg
6f40bcf745
cleanup: Fix whitespace around parameter equals.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
54b2578204
cleanup: Remove unused variables.
...
Generated by autoflake.
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
5428c5f296
typing: Convert function type annotations to Python 3 style.
...
Generated by com2ann (slightly patched to avoid also converting
assignment type annotations, which require Python 3.6), followed by
some manual whitespace adjustment, and two fixes for use-before-define
issues:
- def set_zulip_client(self, zulipToJabberClient: ZulipToJabberBot) -> None:
+ def set_zulip_client(self, zulipToJabberClient: 'ZulipToJabberBot') -> None:
-def init_from_options(options: Any, client: Optional[str] = None) -> Client:
+def init_from_options(options: Any, client: Optional[str] = None) -> 'Client':
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2020-04-18 20:31:14 -07:00
Anders Kaseorg
fe72f3b131
typing: Remove ‘if False’ guard for typing imports.
...
typing is in the Python 3.5 standard library.
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
Eeshan Garg
dd201926fa
pypi_packages: Use README files for long descriptions.
2020-04-16 19:35:54 -07:00
Eeshan Garg
c55bf78c6b
pypi: Specify the correct license classifier for all packages.
2020-04-16 19:35:54 -07:00
rht
4600ce59a3
Remove all remaining from __future__ imports.
2020-04-03 08:18:08 -04:00
rht
204871b518
Finish the remaining migration of shebang to python3.
2020-04-03 08:18:08 -04:00
Eeshan Garg
ce73dab121
pypi: Release version 0.6.4.
2020-03-26 19:52:46 -02:30
Eeshan Garg
0b930cfe86
pypi: Add support for Python 3.8.
2020-03-26 13:38:08 -07:00
neiljp (Neil Pilgrim)
520a004b85
botserver: Raise exceptions rather than returning them.
2020-03-24 21:25:45 -07:00
neiljp (Neil Pilgrim)
fca2404b46
mypy: Add type ignore in botserver/server.py.
2020-03-24 21:25:45 -07:00
Eeshan Garg
957b5e7ad8
pypi: Release version 0.6.3.
2019-12-16 11:48:56 -03:30
Eeshan Garg
efcc89da9d
pypi: Release version 0.6.2.
2019-12-14 16:38:48 -03:30
neiljp (Neil Pilgrim)
0427d962b0
setup.py: Add supported python versions for all packages.
2019-09-03 13:28:32 -07:00
Rohitt Vashishtha
74d902d14f
botserver: Allow importing custom bot modules.
...
We can now specify path to a bot's python file as the ini section
header in the botserver's config file. For example:
[~/Documents/helloworld.py]
email=a@b.com
key=XXXX
site=https://b.com
token=XXXX
2019-09-03 13:27:21 -07:00
Anders Kaseorg
c6a52d798e
zulip_bots, zulip_botserver: Add PEP 561 type annotation markers.
...
Signed-off-by: Anders Kaseorg <anders@zulipchat.com>
2019-08-09 17:29:04 -07:00
Eeshan Garg
e5bcd095fd
pypi: Release version 0.6.1.
2019-07-14 21:17:53 -02:30
Eeshan Garg
accfa8ddaf
pypi: Release version 0.6.0.
2019-03-19 19:43:23 -02:30
Tim Abbott
fae8e4c0b0
botserver: Add a python3 !# line.
2019-03-18 13:10:06 -07:00
Eeshan Garg
d43b9328f0
pypi: Release version 0.5.9.
2019-02-17 02:49:27 -03:30
Eeshan Garg
9931de2c6b
pypi: Release version 0.5.8.
2019-01-22 22:35:37 -03:30
Eeshan Garg
ed6c797d19
pypi: Release version 0.5.7.
2019-01-16 20:50:46 -03:30
Eeshan Garg
d478c91965
pypi: Release version 0.5.6.
2018-12-17 17:07:32 -03:30
Eeshan Garg
09deda9466
pypi: Release version 0.5.5.
2018-09-25 22:36:57 -02:30
Eeshan Garg
048fa79a7c
pypi: Release version 0.5.4.
...
Starting now, we now also have a CHANGELOG to record major changes
to the zulip package.
2018-08-31 17:25:55 -02:30
Eeshan Garg
6151f2db40
pypi: Release version 0.5.3.
2018-08-17 22:21:01 -02:30
Rohitt Vashishtha
cb183fef4c
botserver: Add tests for reading config section by bot name.
2018-07-27 13:43:42 -04:00
Eeshan Garg
1127f973aa
pypi: Release version 0.5.2.
2018-07-26 21:19:12 -02:30