Change in pysim[master]: [pylint] Mark abstract CardKeyProvider.get() method as such

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
Sun May 2 00:56:49 UTC 2021


fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/pysim/+/24025 )


Change subject: [pylint] Mark abstract CardKeyProvider.get() method as such
......................................................................

[pylint] Mark abstract CardKeyProvider.get() method as such

pySim/card_key_provider.py:67:2: E1111:
	Assigning result of a function call, where the function
	has no return (assignment-from-no-return)

Change-Id: I43bab69f53300fbe837944735cd999fab5405d7a
---
M pySim/card_key_provider.py
1 file changed, 3 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/25/24025/1

diff --git a/pySim/card_key_provider.py b/pySim/card_key_provider.py
index 05de0be..67b0b28 100644
--- a/pySim/card_key_provider.py
+++ b/pySim/card_key_provider.py
@@ -30,11 +30,12 @@
 
 from typing import List, Dict, Optional
 
+import abc
 import csv
 
 card_key_providers = [] # type: List['CardKeyProvider']
 
-class CardKeyProvider(object):
+class CardKeyProvider(abc.ABC):
 	"""Base class, not containing any concrete implementation."""
 
 	VALID_FIELD_NAMES = ['ICCID', 'ADM1', 'IMSI', 'PIN1', 'PIN2', 'PUK1', 'PUK2']
@@ -67,6 +68,7 @@
 		result = self.get(fields, key, value)
 		return result.get(field)
 
+	@abc.abstractmethod
 	def get(self, fields:List[str], key:str, value:str) -> Dict[str,str]:
 		"""Get multiple card-individual fields for identified card.
 
@@ -77,7 +79,6 @@
 		Returns:
 			dictionary of {field, value} strings for each requested field from 'fields'
 		"""
-		pass
 
 class CardKeyProviderCsv(CardKeyProvider):
 	"""Card key provider implementation that allows to query against a specified CSV file"""

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

Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I43bab69f53300fbe837944735cd999fab5405d7a
Gerrit-Change-Number: 24025
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210502/295cfe3c/attachment.htm>


More information about the gerrit-log mailing list