add basic support for mypy type checking

This commit is contained in:
Gilles Boccon-Gibod
2023-01-20 00:20:50 -08:00
parent 8a91c614c7
commit 99758e4b7d
30 changed files with 280 additions and 77 deletions
+3 -1
View File
@@ -15,10 +15,12 @@
# -----------------------------------------------------------------------------
# Imports
# -----------------------------------------------------------------------------
from __future__ import annotations
import logging
import struct
from colors import color
import colors
from typing import Dict, Type
from . import core
from .core import InvalidStateError
@@ -520,7 +522,7 @@ class SDP_PDU:
See Bluetooth spec @ Vol 3, Part B - 4.2 PROTOCOL DATA UNIT FORMAT
'''
sdp_pdu_classes = {}
sdp_pdu_classes: Dict[int, Type[SDP_PDU]] = {}
name = None
pdu_id = 0