Correct type signature, clean imports

This commit is contained in:
Midgard 2021-03-23 17:42:41 +01:00
parent 65bfa726ca
commit 3f3b9d5f2f
Signed by: midgard
GPG key ID: 511C112F1331BBB4

View file

@ -3,17 +3,13 @@
import sys
import argparse
import os
from collections import defaultdict
import datetime
from time import sleep
import time
import json
from typing import Dict, Set, Generator, Optional, NamedTuple
import mattermost
from typing import Dict, Optional, List
import re
from threading import Lock
# from threading import Lock
import mattermost
from mmws import MMws
# from mmws import MMws
class NotFound(Exception):
@ -41,7 +37,7 @@ def http_to_ws(url):
return "ws" + url[4:]
def get_posts_for_channel(self, channel_id: str, progress=lambda x: None, **kwargs) -> Generator[Dict, None, None]:
def get_posts_for_channel(self, channel_id: str, progress=lambda x: None, **kwargs) -> List[Dict]:
"""
@raises ApiException: Passed on from lower layers.
"""