diff options
author | Ilya Etingof <etingof@gmail.com> | 2018-07-29 08:48:50 +0200 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2018-07-29 09:23:39 +0200 |
commit | e5c30776b510a88f760ca701558778b08a591e9d (patch) | |
tree | cc44e15cac511603b9437bc0c80c989af091d4b3 /pyasn1/type | |
parent | 4ad415d71beb6b466842e6c32ec6387b88a3dbae (diff) | |
download | pyasn1-e5c30776b510a88f760ca701558778b08a591e9d.tar.gz |
Fix some typos and prepare for 0.4.5
Diffstat (limited to 'pyasn1/type')
-rw-r--r-- | pyasn1/type/base.py | 12 | ||||
-rw-r--r-- | pyasn1/type/constraint.py | 2 | ||||
-rw-r--r-- | pyasn1/type/namedtype.py | 16 |
3 files changed, 15 insertions, 15 deletions
diff --git a/pyasn1/type/base.py b/pyasn1/type/base.py index adaab22..2f4ea4c 100644 --- a/pyasn1/type/base.py +++ b/pyasn1/type/base.py @@ -343,10 +343,10 @@ class AbstractSimpleAsn1Item(Asn1ItemBase): value = self._value - initilaizers = self.readOnly.copy() - initilaizers.update(kwargs) + initializers = self.readOnly.copy() + initializers.update(kwargs) - return self.__class__(value, **initilaizers) + return self.__class__(value, **initializers) def subtype(self, value=noValue, **kwargs): """Create a specialization of |ASN.1| schema or value object. @@ -540,10 +540,10 @@ class AbstractConstructedAsn1Item(Asn1ItemBase): """ cloneValueFlag = kwargs.pop('cloneValueFlag', False) - initilaizers = self.readOnly.copy() - initilaizers.update(kwargs) + initializers = self.readOnly.copy() + initializers.update(kwargs) - clone = self.__class__(**initilaizers) + clone = self.__class__(**initializers) if cloneValueFlag: self._cloneComponentValues(clone, cloneValueFlag) diff --git a/pyasn1/type/constraint.py b/pyasn1/type/constraint.py index a704331..15b887d 100644 --- a/pyasn1/type/constraint.py +++ b/pyasn1/type/constraint.py @@ -352,7 +352,7 @@ class InnerTypeConstraint(AbstractConstraint): if idx not in self.__multipleTypeConstraint: raise error.ValueConstraintError(value) constraint, status = self.__multipleTypeConstraint[idx] - if status == 'ABSENT': # XXX presense is not checked! + if status == 'ABSENT': # XXX presence is not checked! raise error.ValueConstraintError(value) constraint(value) diff --git a/pyasn1/type/namedtype.py b/pyasn1/type/namedtype.py index f162d19..0ce18df 100644 --- a/pyasn1/type/namedtype.py +++ b/pyasn1/type/namedtype.py @@ -265,18 +265,18 @@ class NamedTypes(object): return nameToPosMap def __computeAmbiguousTypes(self): - ambigiousTypes = {} - partialAmbigiousTypes = () + ambiguousTypes = {} + partialAmbiguousTypes = () for idx, namedType in reversed(tuple(enumerate(self.__namedTypes))): if namedType.isOptional or namedType.isDefaulted: - partialAmbigiousTypes = (namedType,) + partialAmbigiousTypes + partialAmbiguousTypes = (namedType,) + partialAmbiguousTypes else: - partialAmbigiousTypes = (namedType,) - if len(partialAmbigiousTypes) == len(self.__namedTypes): - ambigiousTypes[idx] = self + partialAmbiguousTypes = (namedType,) + if len(partialAmbiguousTypes) == len(self.__namedTypes): + ambiguousTypes[idx] = self else: - ambigiousTypes[idx] = NamedTypes(*partialAmbigiousTypes, **dict(terminal=True)) - return ambigiousTypes + ambiguousTypes[idx] = NamedTypes(*partialAmbiguousTypes, **dict(terminal=True)) + return ambiguousTypes def getTypeByPosition(self, idx): """Return ASN.1 type object by its position in fields set. |