mirror of
https://git.ianrenton.com/ian/spothole.git
synced 2026-06-24 05:35:10 +00:00
Fix some IDE warnings, mostly around type safety on the Python side
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
import re
|
||||
from datetime import datetime
|
||||
from typing import cast
|
||||
|
||||
import pytz
|
||||
from rss_parser import Parser
|
||||
from rss_parser.models.rss import RSS
|
||||
|
||||
from alertproviders.http_alert_provider import HTTPAlertProvider
|
||||
from data.alert import Alert
|
||||
@@ -20,7 +22,7 @@ class NG3K(HTTPAlertProvider):
|
||||
|
||||
def _http_response_to_alerts(self, http_response):
|
||||
new_alerts = []
|
||||
rss = Parser.parse(http_response.content.decode())
|
||||
rss = cast(RSS, Parser.parse(http_response.content.decode()))
|
||||
# Iterate through source data
|
||||
for source_alert in rss.channel.items:
|
||||
# Deal with "the format"...
|
||||
|
||||
Reference in New Issue
Block a user