Change in pysim[master]: Add type annotations to card_data.py
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
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]
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-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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gerrit-log