From 339c17ddaf8cb7a8228f86cd8f98c1e4bef517bd Mon Sep 17 00:00:00 2001 From: Arjun Satarkar Date: Sat, 29 Jul 2023 23:17:24 +0530 Subject: Simplify logic --- tagrss.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tagrss.py b/tagrss.py index e22c6b6..25efdd1 100644 --- a/tagrss.py +++ b/tagrss.py @@ -97,9 +97,7 @@ class TagRss: included_feeds: typing.Optional[typing.Collection[int]] = None, included_tags: typing.Optional[typing.Collection[str]] = None, ) -> list[dict[str, typing.Any]]: - where_clause: str = "" - if included_feeds or included_tags: - where_clause = "WHERE 1" + where_clause: str = "WHERE 1" if included_feeds: where_clause += f" AND feed_id IN ({','.join('?' * len(included_feeds))})" if included_tags: -- cgit v1.2.3-57-g22cb