Change in pysim[master]: Add type annotations to card_data.py

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

fixeria gerrit-no-reply at lists.osmocom.org
Sat Apr 3 22:28:39 UTC 2021


fixeria has posted comments on this change. ( https://gerrit.osmocom.org/c/pysim/+/23590 )

Change subject: Add type annotations to card_data.py
......................................................................


Patch Set 1: Code-Review-1

(2 comments)

https://gerrit.osmocom.org/c/pysim/+/23590/1/pySim/card_data.py 
File pySim/card_data.py:

https://gerrit.osmocom.org/c/pysim/+/23590/1/pySim/card_data.py@26 
PS1, Line 26: card_data_provider = List[CardData]
This looks wrong to me. It was a 'list' and now becomes a sub-type? It's not a list anymore.

I guess what you meant is:

  card_data_provider: List[CardData] = []

but this is not going to work in Python 3.5, so instead:

  card_data_provider = [] # type: List[CardData]


https://gerrit.osmocom.org/c/pysim/+/23590/1/pySim/card_data.py@53 
PS1, Line 53: get
This is a new method, while the commit claims to add type annotations. Am I missing something? The fact that this method is supposed to return a dictionary, but does not return anything alone is odd. Looks like you wanted to add an abstract method, what should be accomplished using '@abc.abstractmethod' (the class itself needs to be inherited from 'abc.ABC'), and probably in a separate commit?



-- 
To view, visit https://gerrit.osmocom.org/c/pysim/+/23590
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: Ia09b3ecaa582d62a97c3adac2650686dc19d5ec1
Gerrit-Change-Number: 23590
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Comment-Date: Sat, 03 Apr 2021 22:28:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210403/3f6a86d5/attachment.htm>


More information about the gerrit-log mailing list