laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/27142 )
Change subject: utils: Fix missing Optional[] in type annotations ......................................................................
utils: Fix missing Optional[] in type annotations
Thanks to Vadim for pointing this out
Change-Id: I6e7d3725f28410d66580e88f2271d2b240d1f98e --- M pySim/utils.py 1 file changed, 3 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/42/27142/1
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 @@ 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 @@ 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 @@ 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