aboutsummaryrefslogtreecommitdiffstats
path: root/app/server.py
diff options
context:
space:
mode:
authorJan Tuomi <jans.tuomi@gmail.com>2023-09-13 14:30:45 +0300
committerJan Tuomi <jans.tuomi@gmail.com>2023-09-13 14:30:45 +0300
commitfa2c9120c47ce61f61444c62fda637f3ed2678ed (patch)
treeb0b4242db2c60f3d9a9b0f094ce6f4c65739b7bc /app/server.py
parentb858cad9ad70ea6dd307559b3169730097fd6c29 (diff)
Remove # type: ignore comments
Diffstat (limited to 'app/server.py')
-rw-r--r--app/server.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/app/server.py b/app/server.py
index 3ff981e..038760e 100644
--- a/app/server.py
+++ b/app/server.py
@@ -1,5 +1,5 @@
-from typing import Any
-import bottle # type: ignore
+from typing import Any, cast
+import bottle
from tinydb import Query
from app.DatabaseManager import database_manager
@@ -19,7 +19,10 @@ def feed_to_tr(feed: dict[str, str]) -> str:
def feeds_to_table(feeds: list[dict[str, str]]) -> str:
if len(feeds) == 0:
- return "No feeds (yet). Add feeds by defining them in your Aggrofile. If you did that already, you might have to wait a bit for the data to propagate."
+ return (
+ "No feeds (yet). Add feeds by defining them in your Aggrofile. "
+ + "If you did that already, you might have to wait a bit for the data to propagate."
+ )
trs: list[str] = [feed_to_tr(feed) for feed in feeds]
thead = f"<thead><tr><td>Feed</td><td>Last build date</td></tr></thead>"
@@ -34,7 +37,7 @@ def index():
Q = Query()
_feeds = database_manager.feeds.all()
- feeds: list[dict[str, str]] = _feeds # type: ignore
+ feeds = cast(list[dict[str, str]], _feeds)
bottle.response.set_header("content-type", "text/html")
page = f"""
@@ -106,7 +109,7 @@ def feed(feed_id: str):
bottle.response.set_header("content-type", "application/xml")
- feed: Any = res[0] # type: ignore
+ feed: Any = res[0]
feed_xml: str = feed["feed_xml"]
return feed_xml