mirror of https://gerrit.osmocom.org/pysim
[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
This commit is contained in:
parent
1a95d2be61
commit
5ef1650696
|
@ -30,11 +30,12 @@ operation with pySim-shell.
|
||||||
|
|
||||||
from typing import List, Dict, Optional
|
from typing import List, Dict, Optional
|
||||||
|
|
||||||
|
import abc
|
||||||
import csv
|
import csv
|
||||||
|
|
||||||
card_key_providers = [] # type: List['CardKeyProvider']
|
card_key_providers = [] # type: List['CardKeyProvider']
|
||||||
|
|
||||||
class CardKeyProvider(object):
|
class CardKeyProvider(abc.ABC):
|
||||||
"""Base class, not containing any concrete implementation."""
|
"""Base class, not containing any concrete implementation."""
|
||||||
|
|
||||||
VALID_FIELD_NAMES = ['ICCID', 'ADM1', 'IMSI', 'PIN1', 'PIN2', 'PUK1', 'PUK2']
|
VALID_FIELD_NAMES = ['ICCID', 'ADM1', 'IMSI', 'PIN1', 'PIN2', 'PUK1', 'PUK2']
|
||||||
|
@ -67,6 +68,7 @@ class CardKeyProvider(object):
|
||||||
result = self.get(fields, key, value)
|
result = self.get(fields, key, value)
|
||||||
return result.get(field)
|
return result.get(field)
|
||||||
|
|
||||||
|
@abc.abstractmethod
|
||||||
def get(self, fields:List[str], key:str, value:str) -> Dict[str,str]:
|
def get(self, fields:List[str], key:str, value:str) -> Dict[str,str]:
|
||||||
"""Get multiple card-individual fields for identified card.
|
"""Get multiple card-individual fields for identified card.
|
||||||
|
|
||||||
|
@ -77,7 +79,6 @@ class CardKeyProvider(object):
|
||||||
Returns:
|
Returns:
|
||||||
dictionary of {field, value} strings for each requested field from 'fields'
|
dictionary of {field, value} strings for each requested field from 'fields'
|
||||||
"""
|
"""
|
||||||
pass
|
|
||||||
|
|
||||||
class CardKeyProviderCsv(CardKeyProvider):
|
class CardKeyProviderCsv(CardKeyProvider):
|
||||||
"""Card key provider implementation that allows to query against a specified CSV file"""
|
"""Card key provider implementation that allows to query against a specified CSV file"""
|
||||||
|
|
Loading…
Reference in New Issue