ruff: Fix C400 Unnecessary generator (rewrite as a list
comprehension).
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
353c2de050
commit
774edb434e
2 changed files with 3 additions and 4 deletions
|
@ -8,9 +8,8 @@ whitespace_rules: List[Rule] = [
|
||||||
{"pattern": r"\t", "description": "Fix tab-based whitespace"},
|
{"pattern": r"\t", "description": "Fix tab-based whitespace"},
|
||||||
]
|
]
|
||||||
|
|
||||||
markdown_whitespace_rules = list(
|
markdown_whitespace_rules: List[Rule] = [
|
||||||
rule for rule in whitespace_rules if rule["pattern"] != r"[\t ]+$"
|
*(rule for rule in whitespace_rules if rule["pattern"] != r"[\t ]+$"),
|
||||||
) + [
|
|
||||||
# Two spaces trailing a line with other content is okay--it's a markdown line break.
|
# Two spaces trailing a line with other content is okay--it's a markdown line break.
|
||||||
# This rule finds one space trailing a non-space, three or more trailing spaces, and
|
# This rule finds one space trailing a non-space, three or more trailing spaces, and
|
||||||
# spaces on an empty line.
|
# spaces on an empty line.
|
||||||
|
|
|
@ -1012,7 +1012,7 @@ def add_zulip_subscriptions(verbose: bool) -> None:
|
||||||
|
|
||||||
if len(zephyr_subscriptions) != 0:
|
if len(zephyr_subscriptions) != 0:
|
||||||
res = zulip_client.add_subscriptions(
|
res = zulip_client.add_subscriptions(
|
||||||
list({"name": stream} for stream in zephyr_subscriptions),
|
[{"name": stream} for stream in zephyr_subscriptions],
|
||||||
authorization_errors_fatal=False,
|
authorization_errors_fatal=False,
|
||||||
)
|
)
|
||||||
if res.get("result") != "success":
|
if res.get("result") != "success":
|
||||||
|
|
Loading…
Add table
Reference in a new issue