mirror of
https://github.com/zulip/zulip.git
synced 2025-11-03 13:33:24 +00:00
ruff: Enable new lints DTZ, ISC, PIE, PLW, Q, S, SIM.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
17300f196c
commit
2afdb46095
@@ -461,7 +461,7 @@ def main(options: argparse.Namespace) -> NoReturn:
|
||||
activate_this = "/srv/zulip-py3-venv/bin/activate_this.py"
|
||||
provision_inner = os.path.join(ZULIP_PATH, "tools", "lib", "provision_inner.py")
|
||||
with open(activate_this) as f:
|
||||
exec(f.read(), dict(__file__=activate_this))
|
||||
exec(f.read(), dict(__file__=activate_this)) # noqa: S102
|
||||
os.execvp(
|
||||
provision_inner,
|
||||
[
|
||||
|
||||
@@ -376,12 +376,6 @@ python_rules = RuleList(
|
||||
},
|
||||
"description": "Please use access_stream_by_*() to fetch Stream objects",
|
||||
},
|
||||
{
|
||||
"pattern": "datetime[.](now|utcnow)",
|
||||
"include_only": {"zerver/", "analytics/"},
|
||||
"description": "Don't use datetime in backend code.\n"
|
||||
"See https://zulip.readthedocs.io/en/latest/contributing/code-style.html#naive-datetime-objects",
|
||||
},
|
||||
{
|
||||
"pattern": "from os.path",
|
||||
"description": "Don't use from when importing from the standard library",
|
||||
|
||||
Reference in New Issue
Block a user