summaryrefslogtreecommitdiff
path: root/pyasn1
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2017-11-09 12:40:54 +0100
committerIlya Etingof <etingof@gmail.com>2017-11-09 12:40:54 +0100
commit12a69bbbc4307b101b68c25dd62a0b6fee4ad4ef (patch)
treeca4b7897bb31e1365a972cfc3d6f10b4524c7787 /pyasn1
parent1a499916db6ef2655a7ffbdc1ea653bc6dc6e1cb (diff)
downloadpyasn1-git-12a69bbbc4307b101b68c25dd62a0b6fee4ad4ef.tar.gz
pep8 (stray spaces removed)
Diffstat (limited to 'pyasn1')
-rw-r--r--pyasn1/error.py4
-rw-r--r--pyasn1/type/base.py14
-rw-r--r--pyasn1/type/namedtype.py2
-rw-r--r--pyasn1/type/namedval.py2
-rw-r--r--pyasn1/type/univ.py36
-rw-r--r--pyasn1/type/useful.py8
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 f22823b..ec323b2 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,14 +149,14 @@ 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
*PyAsn1Error* exception.
"""
skipMethods = ('__getattribute__', '__getattr__', '__setattr__', '__delattr__',
- '__class__', '__init__', '__del__', '__new__', '__repr__',
+ '__class__', '__init__', '__del__', '__new__', '__repr__',
'__qualname__', '__objclass__', 'im_class', '__sizeof__')
_instance = None
@@ -261,7 +261,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.).
@@ -351,7 +351,7 @@ class AbstractSimpleAsn1Item(Asn1ItemBase):
Returns
-------
:
- new instance of |ASN.1| schema or value object
+ new instance of |ASN.1| schema or value object
Note
----
@@ -553,7 +553,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 43c0d2c..788dcd5 100644
--- a/pyasn1/type/univ.py
+++ b/pyasn1/type/univ.py
@@ -491,7 +491,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`
@@ -661,7 +661,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'.
@@ -1508,33 +1508,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)
"""
@@ -1666,7 +1666,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.).
@@ -2002,7 +2002,7 @@ class SequenceAndSetBase(base.AbstractConstructedAsn1Item):
Examples
--------
-
+
.. code-block:: python
# can also be Set
@@ -2010,24 +2010,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)
"""
@@ -2140,7 +2140,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.).
@@ -2610,7 +2610,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
-------
: