[cosmetic] esim.saip: Fix various typos in comments/docs/messages

Change-Id: I4fc603634a0f2b53e432a77f05e811a38ba065c2
This commit is contained in:
Harald Welte
2024-11-22 16:59:26 +01:00
parent 779092b0cd
commit 93237f4407

View File

@@ -450,7 +450,7 @@ class ProfileElement:
@property @property
def header_name(self) -> str: def header_name(self) -> str:
"""Return the name of the header field within the profile element.""" """Return the name of the header field within the profile element."""
# unneccessarry compliaction by inconsistent naming :( # unnecessary complication by inconsistent naming :(
if self.type.startswith('opt-'): if self.type.startswith('opt-'):
return self.type.replace('-','') + '-header' return self.type.replace('-','') + '-header'
if self.type in self.header_name_translation_dict: if self.type in self.header_name_translation_dict:
@@ -933,7 +933,7 @@ class SecurityDomainKeyComponent:
'macLength': self.mac_length} 'macLength': self.mac_length}
class SecurityDomainKey: class SecurityDomainKey:
"""Represenation of a key used for SCP access to a security domain.""" """Representation of a key used for SCP access to a security domain."""
def __init__(self, key_version_number: int, key_id: int, key_usage_qualifier: dict, def __init__(self, key_version_number: int, key_id: int, key_usage_qualifier: dict,
key_components: List[SecurityDomainKeyComponent]): key_components: List[SecurityDomainKeyComponent]):
self.key_usage_qualifier = key_usage_qualifier self.key_usage_qualifier = key_usage_qualifier
@@ -1276,7 +1276,7 @@ class ProfileElementSequence:
sequence.""" sequence."""
def __init__(self): def __init__(self):
"""After calling the constructor, you have to further initialize the instance by either """After calling the constructor, you have to further initialize the instance by either
calling the parse_der() method, or by manually adding individual PEs, including the hedaer and calling the parse_der() method, or by manually adding individual PEs, including the header and
end PEs.""" end PEs."""
self.pe_list: List[ProfileElement] = [] self.pe_list: List[ProfileElement] = []
self.pe_by_type: Dict = {} self.pe_by_type: Dict = {}
@@ -1298,7 +1298,7 @@ class ProfileElementSequence:
def add_hdr_and_end(self): def add_hdr_and_end(self):
"""Initialize the PE Sequence with a header and end PE.""" """Initialize the PE Sequence with a header and end PE."""
if len(self.pe_list): if len(self.pe_list):
raise ValueError("Cannot add header + end PE to a non-enmpty PE-Sequence") raise ValueError("Cannot add header + end PE to a non-empty PE-Sequence")
# start with a minimal/empty sequence of header + end # start with a minimal/empty sequence of header + end
self.append(ProfileElementHeader()) self.append(ProfileElementHeader())
self.append(ProfileElementEnd()) self.append(ProfileElementEnd())
@@ -1315,7 +1315,7 @@ class ProfileElementSequence:
def get_pe_for_type(self, tname: str) -> Optional[ProfileElement]: def get_pe_for_type(self, tname: str) -> Optional[ProfileElement]:
"""Return a single profile element for given profile element type. Works only for """Return a single profile element for given profile element type. Works only for
types of which there is only a signle instance in the PE Sequence!""" types of which there is only a single instance in the PE Sequence!"""
l = self.get_pes_for_type(tname) l = self.get_pes_for_type(tname)
if len(l) == 0: if len(l) == 0:
return None return None
@@ -1323,7 +1323,7 @@ class ProfileElementSequence:
return l[0] return l[0]
def get_pes_for_templateID(self, tid: oid.OID) -> List[ProfileElement]: def get_pes_for_templateID(self, tid: oid.OID) -> List[ProfileElement]:
"""Return list of profile elements present for given profile eleemnt type.""" """Return list of profile elements present for given profile element type."""
res = [] res = []
for pe in self.pe_list: for pe in self.pe_list:
if not pe.templateID: if not pe.templateID: