Skip to content

Commit 13e860e

Browse files
committed
ruff: Fix C417 Unnecessary map usage (rewrite using a generator expression).
Signed-off-by: Anders Kaseorg <[email protected]>
1 parent 774edb4 commit 13e860e

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

zulip_bots/zulip_bots/provision.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,7 @@
1212
def get_bot_paths() -> Iterator[str]:
1313
current_dir = os.path.dirname(os.path.abspath(__file__))
1414
bots_dir = os.path.join(current_dir, "bots")
15-
bots_subdirs = map(lambda d: os.path.abspath(d), glob.glob(bots_dir + "/*"))
16-
paths = filter(lambda d: os.path.isdir(d), bots_subdirs)
17-
return paths
15+
return (os.path.abspath(d) for d in glob.glob(bots_dir + "/*/"))
1816

1917

2018
def provision_bot(path_to_bot: str, force: bool) -> None:

0 commit comments

Comments
 (0)