aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHarald Welte <laforge@osmocom.org>2022-02-10 19:32:04 +0100
committerHarald Welte <laforge@osmocom.org>2022-02-11 13:32:58 +0100
commit425038ffbc05c467e6019489aaaa9d86055a7a2b (patch)
tree61b239e786f27467c4d92b3d0366e7d75923c5fa
parentc91085e744fa5fd136e73117e720af86c8418a2e (diff)
utils: Fix missing Optional[] in type annotations
Thanks to Vadim for pointing this out Change-Id: I6e7d3725f28410d66580e88f2271d2b240d1f98e
-rw-r--r--pySim/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pySim/utils.py b/pySim/utils.py
index 3ce3e58..555aa82 100644
--- a/pySim/utils.py
+++ b/pySim/utils.py
@@ -1253,7 +1253,7 @@ class DataObject(abc.ABC):
has the habit of specifying TLV data but with very spcific ordering, or specific choices of
tags at specific points in a stream. This class tries to represent this."""
- def __init__(self, name: str, desc: str = None, tag: int = None):
+ def __init__(self, name: str, desc: Optional[str] = None, tag: Optional[int] = None):
"""
Args:
name: A brief, all-lowercase, underscore separated string identifier
@@ -1376,7 +1376,7 @@ class DataObjectCollection:
A given encoded DO may contain any of them in any order, and may contain multiple instances
of each DO."""
- def __init__(self, name: str, desc: str = None, members=None):
+ def __init__(self, name: str, desc: Optional[str] = None, members=None):
self.name = name
self.desc = desc
self.members = members or []
@@ -1491,7 +1491,7 @@ class DataObjectSequence:
By wrapping them into this formal DataObjectSequence, we can offer convenience methods
for encoding or decoding an entire sequence."""
- def __init__(self, name: str, desc: str = None, sequence=None):
+ def __init__(self, name: str, desc: Optional[str] = None, sequence=None):
self.sequence = sequence or []
self.name = name
self.desc = desc