diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-05-20 09:09:08 +0300 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2016-06-03 02:31:08 +0300 |
commit | a0ce575d8e97ff7db4634883a586c50302d980db (patch) | |
tree | 29d7a568b68e47dc5ef85d705c29a94b4c6ac3de | |
parent | a2192a018991a5707dd1a4b17d5f5604103826e6 (diff) |
Fix types for feed
-rw-r--r-- | Makefile | 7 | ||||
-rw-r--r-- | nextcloud_news_updater/api/api.py | 2 | ||||
-rw-r--r-- | nextcloud_news_updater/api/web.py | 2 |
3 files changed, 8 insertions, 3 deletions
@@ -35,4 +35,9 @@ test: python3 -m nextcloud_news_updater --version python3 -m unittest #uncomment once mypy works properly - #python3 -m mypy owncloud_news_updater --disallow-untyped-defs + # make typecheck + +.PHONY: typecheck +typecheck: + python3 -m mypy $(CURDIR)/owncloud_news_updater --disallow-untyped-defs + diff --git a/nextcloud_news_updater/api/api.py b/nextcloud_news_updater/api/api.py index 526ffc7..837583c 100644 --- a/nextcloud_news_updater/api/api.py +++ b/nextcloud_news_updater/api/api.py @@ -7,7 +7,7 @@ class Feed: Payload object for update infos """ - def __init__(self, feed_id: str, user_id: str) -> None: + def __init__(self, feed_id: int, user_id: str) -> None: self.feed_id = feed_id self.user_id = user_id diff --git a/nextcloud_news_updater/api/web.py b/nextcloud_news_updater/api/web.py index 1fe640b..5516a58 100644 --- a/nextcloud_news_updater/api/web.py +++ b/nextcloud_news_updater/api/web.py @@ -104,7 +104,7 @@ class WebUpdateThread(UpdateThread): # to test and reason about, normal dicts are not ordered data = OrderedDict([ ('userId', feed.user_id), - ('feedId', feed.feed_id), + ('feedId', str(feed.feed_id)), ]) url_data = urlencode(data) url = '%s?%s' % (self.api.update_url, url_data) |