aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArjun Satarkar <me@arjunsatarkar.net>2023-07-29 17:47:24 +0000
committerArjun Satarkar <me@arjunsatarkar.net>2023-07-29 17:47:24 +0000
commit339c17ddaf8cb7a8228f86cd8f98c1e4bef517bd (patch)
treeb9f9442de6f6342d5602e4da1d8abb6ba94cc0df
parent214ca33b6c936b3e6da48190fdcd309513513980 (diff)
downloadtagrss-339c17ddaf8cb7a8228f86cd8f98c1e4bef517bd.tar
tagrss-339c17ddaf8cb7a8228f86cd8f98c1e4bef517bd.tar.gz
tagrss-339c17ddaf8cb7a8228f86cd8f98c1e4bef517bd.zip
Simplify logic
-rw-r--r--tagrss.py4
1 files changed, 1 insertions, 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: