zulip/zerver/tornado
Anders Kaseorg 6988622fe8 ruff: Enable B023 Function definition does not bind loop variable.
Python’s loop scoping is misdesigned, resulting in a very common
gotcha for functions that close over loop variables [1].  The general
problem is so bad that even the Go developers plan to break
compatibility in order to fix the same design mistake in their
language [2].

Enable the Ruff rule function-uses-loop-variable (B023) [3], which
conservatively prohibits functions from binding loop variables at all.

[1] https://docs.python-guide.org/writing/gotchas/#late-binding-closures
[2] https://go.dev/s/loopvar-design
[3] https://beta.ruff.rs/docs/rules/function-uses-loop-variable/

Signed-off-by: Anders Kaseorg <anders@zulip.com>
2023-09-11 18:03:45 -07:00
..
__init__.py
application.py tornado: Construct Django BaseHandler once, not per-request. 2022-09-30 11:20:45 -07:00
descriptors.py tornado: Support sharding by user ID. 2022-11-15 17:27:01 -08:00
django_api.py ruff: Enable B023 Function definition does not bind loop variable. 2023-09-11 18:03:45 -07:00
event_queue.py notifications: Rename 'pm' to 'dm' in 'RecipientInfoResult' dataclass. 2023-08-10 17:41:49 -07:00
exceptions.py exceptions: Update error message for BAD_EVENT_QUEUE_ID. 2022-11-30 17:16:12 -08:00
handlers.py codespell: Correct “requestor” to “requester”. 2023-06-20 16:17:55 -07:00
ioloop_logging.py tornado: Remove instrument_tornado_ioloop. 2022-05-02 17:41:49 -07:00
sharding.py tornado_url: Replace occurrences of `uri` with `url`. 2023-04-26 16:37:16 -07:00
views.py codespell: Correct “requestor” to “requester”. 2023-06-20 16:17:55 -07:00