Skip to content

Commit

Permalink
Replace useless list comprehension with list()
Browse files Browse the repository at this point in the history
  • Loading branch information
WhyNotHugo committed Jun 17, 2024
1 parent 2866179 commit 92bc5cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion todoman/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ def list_command(ctx, *args, **kwargs):
The following commands can further filter shown todos, or include those
omited by default:
"""
hide_list = (len([_ for _ in ctx.db.lists()]) == 1) or (len(kwargs["lists"]) == 1)
hide_list = (len(list(ctx.db.lists())) == 1) or (len(kwargs["lists"]) == 1)

kwargs["categories"] = kwargs.pop("category")

Expand Down

0 comments on commit 92bc5cf

Please sign in to comment.