diff options
author | Ilya Etingof <etingof@gmail.com> | 2017-11-12 12:33:37 +0100 |
---|---|---|
committer | Ilya Etingof <etingof@gmail.com> | 2017-11-12 12:33:37 +0100 |
commit | dc865c255eed64d222cab8bcb9d15e08cc74e2c9 (patch) | |
tree | 57f8a1e9dd5c1441563e60abb664e70c23105b6d | |
parent | d7d962c1574ac56eb5a495a806e00b09a8824ae2 (diff) | |
parent | cddc8b877b03c1e6b739dec31a4706ae1620fc07 (diff) | |
download | pyasn1-git-dc865c255eed64d222cab8bcb9d15e08cc74e2c9.tar.gz |
Merge branch 'devel-0.4.1' of github.com:etingof/pyasn1 into devel-0.4.1
-rw-r--r-- | pyasn1/error.py | 4 | ||||
-rw-r--r-- | pyasn1/type/base.py | 12 | ||||
-rw-r--r-- | pyasn1/type/namedtype.py | 2 | ||||
-rw-r--r-- | pyasn1/type/namedval.py | 2 | ||||
-rw-r--r-- | pyasn1/type/univ.py | 38 | ||||
-rw-r--r-- | pyasn1/type/useful.py | 8 |
6 files changed, 33 insertions, 33 deletions
diff --git a/pyasn1/error.py b/pyasn1/error.py index 5eadfac..1249e75 100644 --- a/pyasn1/error.py +++ b/pyasn1/error.py @@ -15,8 +15,8 @@ class PyAsn1Error(Exception): class ValueConstraintError(PyAsn1Error): """Create pyasn1 exception object - - The `ValueConstraintError` exception indicates an ASN.1 value + + The `ValueConstraintError` exception indicates an ASN.1 value constraint violation. """ diff --git a/pyasn1/type/base.py b/pyasn1/type/base.py index 73755cc..a20eff4 100644 --- a/pyasn1/type/base.py +++ b/pyasn1/type/base.py @@ -94,7 +94,7 @@ class Asn1ItemBase(Asn1Item): def isSuperTypeOf(self, other, matchTags=True, matchConstraints=True): """Examine |ASN.1| type for subtype relationship with other ASN.1 type. - + ASN.1 tags (:py:mod:`~pyasn1.type.tag`) and constraints (:py:mod:`~pyasn1.type.constraint`) are examined when carrying out ASN.1 types comparison. @@ -104,7 +104,7 @@ class Asn1ItemBase(Asn1Item): Parameters ---------- other: a pyasn1 type object - Class instance representing ASN.1 type. + Class instance representing ASN.1 type. Returns ------- @@ -149,7 +149,7 @@ class NoValue(object): Only ASN.1 schema-related operations can be performed on ASN.1 schema objects. - + Warning ------- Any operation attempted on the *noValue* object will raise the @@ -283,7 +283,7 @@ class AbstractSimpleAsn1Item(Asn1ItemBase): """Indicate that |ASN.1| object represents ASN.1 value. If *isValue* is `False` then this object represents just ASN.1 schema. - + If *isValue* is `True` then, in addition to its ASN.1 schema features, this object can also be used like a Python built-in object (e.g. `int`, `str`, `dict` etc.). @@ -373,7 +373,7 @@ class AbstractSimpleAsn1Item(Asn1ItemBase): Returns ------- : - new instance of |ASN.1| schema or value object + new instance of |ASN.1| schema or value object Note ---- @@ -575,7 +575,7 @@ class AbstractConstructedAsn1Item(Asn1ItemBase): Add ASN.1 constraints object to one of the `self`'s, then use the result as new object's ASN.1 constraints. - + Returns ------- : diff --git a/pyasn1/type/namedtype.py b/pyasn1/type/namedtype.py index 13b30af..256ba56 100644 --- a/pyasn1/type/namedtype.py +++ b/pyasn1/type/namedtype.py @@ -75,7 +75,7 @@ class NamedType(object): @property def name(self): return self.__name - + @property def asn1Object(self): return self.__type diff --git a/pyasn1/type/namedval.py b/pyasn1/type/namedval.py index d2d0f25..99008da 100644 --- a/pyasn1/type/namedval.py +++ b/pyasn1/type/namedval.py @@ -23,7 +23,7 @@ class NamedValues(object): Parameters ---------- - \*args: variable number of two-element :py:class:`tuple` + \*args: variable number of two-element :py:class:`tuple` name: :py:class:`str` Value label diff --git a/pyasn1/type/univ.py b/pyasn1/type/univ.py index 1ccbf8e..9d16b05 100644 --- a/pyasn1/type/univ.py +++ b/pyasn1/type/univ.py @@ -492,7 +492,7 @@ class BitString(base.AbstractSimpleAsn1Item): @classmethod def fromHexString(cls, value, internalFormat=False, prepend=None): """Create a |ASN.1| object initialized from the hex string. - + Parameters ---------- value: :class:`str` @@ -662,7 +662,7 @@ class OctetString(base.AbstractSimpleAsn1Item): binValue: :py:class:`str` Binary string initializer to use instead of the *value*. Example: '10110011'. - + hexValue: :py:class:`str` Hexadecimal string initializer to use instead of the *value*. Example: 'DEADBEEF'. @@ -1509,33 +1509,33 @@ class SequenceOfAndSetOfBase(base.AbstractConstructedAsn1Item): ------- : :py:class:`~pyasn1.type.base.PyAsn1Item` Instantiate |ASN.1| component type or return existing component value - + Examples -------- - + .. code-block:: python # can also be SetOf class MySequenceOf(SequenceOf): componentType = OctetString() - + s = MySequenceOf() - + # returns noValue s.getComponentByPosition(0, instantiate=False) # sets component #0 to OctetString() ASN.1 schema # object and returns it s.getComponentByPosition(0, instantiate=True) - + # sets component #0 to ASN.1 value object s.setComponentByPosition(0, 'ABCD') # returns OctetString('ABCD') value object s.getComponentByPosition(0, instantiate=False) - + s.clear() - + # returns noValue s.getComponentByPosition(0, instantiate=False) """ @@ -1667,7 +1667,7 @@ class SequenceOfAndSetOfBase(base.AbstractConstructedAsn1Item): """Indicate that |ASN.1| object represents ASN.1 value. If *isValue* is `False` then this object represents just ASN.1 schema. - + If *isValue* is `True` then, in addition to its ASN.1 schema features, this object can also be used like a Python built-in object (e.g. `int`, `str`, `dict` etc.). @@ -2003,7 +2003,7 @@ class SequenceAndSetBase(base.AbstractConstructedAsn1Item): Examples -------- - + .. code-block:: python # can also be Set @@ -2011,24 +2011,24 @@ class SequenceAndSetBase(base.AbstractConstructedAsn1Item): componentType = NamedTypes( NamedType('id', OctetString()) ) - + s = MySequence() - + # returns noValue s.getComponentByPosition(0, instantiate=False) # sets component #0 to OctetString() ASN.1 schema # object and returns it s.getComponentByPosition(0, instantiate=True) - + # sets component #0 to ASN.1 value object s.setComponentByPosition(0, 'ABCD') # returns OctetString('ABCD') value object s.getComponentByPosition(0, instantiate=False) - + s.clear() - + # returns noValue s.getComponentByPosition(0, instantiate=False) """ @@ -2141,7 +2141,7 @@ class SequenceAndSetBase(base.AbstractConstructedAsn1Item): """Indicate that |ASN.1| object represents ASN.1 value. If *isValue* is `False` then this object represents just ASN.1 schema. - + If *isValue* is `True` then, in addition to its ASN.1 schema features, this object can also be used like a Python built-in object (e.g. `int`, `str`, `dict` etc.). @@ -2550,7 +2550,7 @@ class Choice(Set): Set.setComponentByPosition(self, idx, value, verifyConstraints, matchTags, matchConstraints) self._currentIdx = idx if oldIdx is not None and oldIdx != idx: - self._componentValues[oldIdx] = None + self._componentValues[oldIdx] = noValue return self @property @@ -2611,7 +2611,7 @@ class Choice(Set): """Indicate that |ASN.1| object represents ASN.1 value. If *isValue* is `False` then this object represents just ASN.1 schema. - + If *isValue* is `True` then, in addition to its ASN.1 schema features, this object can also be used like a Python built-in object (e.g. `int`, `str`, `dict` etc.). diff --git a/pyasn1/type/useful.py b/pyasn1/type/useful.py index 7f7cd1e..98be840 100644 --- a/pyasn1/type/useful.py +++ b/pyasn1/type/useful.py @@ -61,7 +61,7 @@ class TimeMixIn(object): Returns ------- : - new instance of :py:class:`datetime.datetime` object + new instance of :py:class:`datetime.datetime` object """ text = str(self) if text.endswith('Z'): @@ -128,9 +128,9 @@ class TimeMixIn(object): Parameters ---------- dt: :py:class:`datetime.datetime` object - The `datetime.datetime` object to initialize the |ASN.1| object from - - + The `datetime.datetime` object to initialize the |ASN.1| object + from + Returns ------- : |