Anders Kaseorg
c75f5b3a09
ruff: Fix SIM101 Multiple isinstance
calls for val
, merge into a single call.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-29 18:17:39 -07:00
Anders Kaseorg
13e860ee10
ruff: Fix C417 Unnecessary map
usage (rewrite using a generator expression).
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-29 17:36:51 -07:00
Anders Kaseorg
774edb434e
ruff: Fix C400 Unnecessary generator (rewrite as a list
comprehension).
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-29 17:36:51 -07:00
Anders Kaseorg
353c2de050
ruff: Fix EXE002 The file is executable but no shebang is present.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-29 16:54:40 -07:00
Anders Kaseorg
ca3e5a2746
ruff: Fix EXE001 Shebang is present but file is not executable.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-29 16:54:40 -07:00
Anders Kaseorg
235f92afb0
ruff: Fix TRY401 Redundant exception object included in logging.exception
call.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-28 16:29:20 -07:00
Anders Kaseorg
6b2861c3ec
ruff: Fix G004 Logging statement uses f-string.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-28 16:18:11 -07:00
Anders Kaseorg
d85ace8e7e
ruff: Fix G003 Logging statement uses +
.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-28 16:17:21 -07:00
Anders Kaseorg
02e0555e0d
ruff: Fix G002 Logging statement uses %
.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-28 16:17:21 -07:00
Anders Kaseorg
e537bbefdf
ruff: Fix G001 Logging statement uses str.format
.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-28 16:17:21 -07:00
Anders Kaseorg
1ccb5db6ef
ruff: Fix G010 Logging statement uses warn
instead of warning
.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-28 16:17:21 -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
63246e4369
ruff: Fix RUF010 Use explicit conversion flag.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-27 22:41:04 -07:00
Anders Kaseorg
52a7b0b6a3
ruff: Fix ISC003 Explicitly concatenated string should be implicitly concatenated.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-27 22:14:10 -07:00
Anders Kaseorg
c471f26d45
ruff: Fix ISC001 Implicitly concatenated string literals on one line.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-27 22:14:10 -07:00
Anders Kaseorg
2f581293d9
ruff: Fix FLY002 Consider f-string instead of string join.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-27 22:09:17 -07:00
Anders Kaseorg
fcd4fe330d
ruff: Fix UP031 Use format specifiers instead of percent format.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-27 22:04:41 -07:00
Anders Kaseorg
ddccf0eda3
ruff: Fix UP032 Use f-string instead of format
call.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-27 22:01:58 -07:00
Anders Kaseorg
a49add3d02
lint: Replace Black with Ruff.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-27 19:08:40 -07:00
Anders Kaseorg
2a0eff653d
lint: Replace isort with Ruff.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-27 19:04:29 -07:00
Anders Kaseorg
01a27a3a1b
lint: Replace Flake8 with Ruff.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-27 18:58:49 -07:00
Anders Kaseorg
61abe11c1a
run-mypy: Remove options that duplicate the mypy configuration.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-27 17:53:37 -07:00
Anders Kaseorg
5c0f88d1e1
mypy: Improve configuration.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-27 17:53:37 -07:00
Anders Kaseorg
b725058e0a
requirements: Add typing stubs for beautifulsoup4 and httplib2.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-27 17:47:53 -07:00
Anders Kaseorg
5c299c7eff
google_search: Add missing type annotations.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-27 17:47:53 -07:00
Anders Kaseorg
602ebb18fe
connect_four: Add missing type annotations.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-27 17:40:41 -07:00
Anders Kaseorg
a2cbd7ef68
requirements: Install zulint non-editable so mypy can find it.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-27 17:14:25 -07:00
Anders Kaseorg
4b7bfb644f
requirements: Upgrade zulint.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-26 17:36:00 -07:00
Anders Kaseorg
6cb1d5f775
mypy: Enable explicit-override error.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-26 14:03:17 -07:00
Anders Kaseorg
43654b9cf2
mypy: Enable ignore-without-code error.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-26 13:43:42 -07:00
Anders Kaseorg
95b33b83b5
mypy: Enable redundant-expr error.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-26 13:41:24 -07:00
Anders Kaseorg
e747d3b712
mypy: Enable no_implicit_reexport.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-26 13:38:57 -07:00
Anders Kaseorg
25c8123a80
mypy: Move configuration to pyproject.toml, with some modernization.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-26 13:25:14 -07:00
Anders Kaseorg
3b4867ad46
simple_lib: Add type annotations.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-25 16:59:41 -07:00
Anders Kaseorg
01d5106e9a
tools: Add type annotations.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-25 16:59:41 -07:00
Anders Kaseorg
a9e3fe9d0c
zulip_trello: Add type annotations.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-25 16:21:34 -07:00
Anders Kaseorg
40fba154c2
get-google-credentials: Remove Python 2 compatibility.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-25 16:19:32 -07:00
Anders Kaseorg
f55d5ea555
Mark Python 3.11 supported.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-25 16:00:47 -07:00
Anders Kaseorg
4e360828ba
mypy: Enable explicit_package_bases.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-25 15:58:50 -07:00
Anders Kaseorg
8045cf4e65
pytest: Configure pythonpath.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-25 15:58:50 -07:00
Anders Kaseorg
183bb933b4
test_run: Patch importlib.import_module last.
...
importlib.import_module is now used in the implementation of
unittest.mock.patch.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-25 15:58:50 -07:00
Anders Kaseorg
6b585f8b73
black: Bump target-version to py38.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-25 15:48:18 -07:00
Anders Kaseorg
8eb3d4e1e2
Upgrade requirements.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-25 13:23:51 -07:00
Anders Kaseorg
2ecabb3260
Fix signal handler types.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-25 13:23:51 -07:00
Anders Kaseorg
98e23bdfd4
Remove Python 3.7 support.
...
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-25 13:23:37 -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
Anders Kaseorg
8abca34a05
youtube: Fix for HTTPError stub change.
...
https://github.com/python/typeshed/pull/10875
Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-10-17 19:03:47 -07:00
Prakhar Pratyush
ccda105d1d
bot_server: Support trigger private_message renamed to direct_message.
...
The JSON payload that Zulip server POST for outgoing webhooks
has 'trigger' as one of the fields.
In https://github.com/zulip/zulip/commit/c4e4737 , we renamed
the 'private_message' value to 'direct_message'.
This commit adds support to the botserver for handling
'direct_message' as a trigger value. It still supports
'private_message' for self-hosted server compatibility.
2023-09-21 09:13:40 -07:00
Daniel Teunis
35a8ff8839
zulip-integrations: Add missing dependencies to requirement files.
...
Adds missing items to the requirement files for the zulip integrations
in `zulip/integrations/*`.
2023-08-11 12:36:11 -07:00
Zixuan James Li
8016ed144c
api: Update add_realm_filter to support url_template.
...
This adds support to adding linkifiers with the new URL template syntax.
Signed-off-by: Zixuan James Li <p359101898@gmail.com>
2023-08-11 12:35:46 -07:00