summaryrefslogtreecommitdiff
path: root/netdisco/ssdp.py
diff options
context:
space:
mode:
Diffstat (limited to 'netdisco/ssdp.py')
-rw-r--r--netdisco/ssdp.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/netdisco/ssdp.py b/netdisco/ssdp.py
index 55cb08b..7c4dd9c 100644
--- a/netdisco/ssdp.py
+++ b/netdisco/ssdp.py
@@ -4,6 +4,7 @@ import select
import socket
import logging
from datetime import datetime, timedelta
+from typing import Dict, List, Optional, Set # noqa: F401
from xml.etree import ElementTree
import requests
@@ -33,7 +34,7 @@ class SSDP:
def __init__(self):
"""Initialize the discovery."""
- self.entries = []
+ self.entries = [] # type: List[UPNPEntry]
self.last_scan = None
def scan(self):
@@ -65,7 +66,7 @@ class SSDP:
"""
self.update()
- seen = set()
+ seen = set() # type: Set[Optional[str]]
results = []
# Make unique based on the location since we don't care about ST here
@@ -100,7 +101,7 @@ class SSDP:
class UPNPEntry:
"""Found uPnP entry."""
- DESCRIPTION_CACHE = {'_NO_LOCATION': {}}
+ DESCRIPTION_CACHE = {'_NO_LOCATION': {}} # type: Dict[str, Dict]
def __init__(self, values):
"""Initialize the discovery."""