diff options
author | Ilya Etingof <etingof@gmail.com> | 2017-10-21 16:07:17 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-21 16:07:17 +0200 |
commit | 262793a79cad797601fa855eec1e1020e1a534cb (patch) | |
tree | c8ef7e3d079887a4aaf9b87e662787f47785a191 /pyasn1/codec | |
parent | 69c29f0522fe118262c813005590fbb256dfd679 (diff) | |
download | pyasn1-262793a79cad797601fa855eec1e1020e1a534cb.tar.gz |
Add more content to docs (#96)
* minor fixes to RsT docstrings
* more explanations in the docs, better linkage
* cosmetic fixes to NamedValues() docstring
Diffstat (limited to 'pyasn1/codec')
-rw-r--r-- | pyasn1/codec/ber/decoder.py | 6 | ||||
-rw-r--r-- | pyasn1/codec/ber/encoder.py | 2 | ||||
-rw-r--r-- | pyasn1/codec/cer/decoder.py | 6 | ||||
-rw-r--r-- | pyasn1/codec/cer/encoder.py | 4 | ||||
-rw-r--r-- | pyasn1/codec/der/decoder.py | 6 | ||||
-rw-r--r-- | pyasn1/codec/der/encoder.py | 4 | ||||
-rw-r--r-- | pyasn1/codec/native/decoder.py | 2 |
7 files changed, 22 insertions, 8 deletions
diff --git a/pyasn1/codec/ber/decoder.py b/pyasn1/codec/ber/decoder.py index 8bdffcf..725eaa3 100644 --- a/pyasn1/codec/ber/decoder.py +++ b/pyasn1/codec/ber/decoder.py @@ -1329,15 +1329,17 @@ class Decoder(object): #: Turns BER octet stream into an ASN.1 object. #: -#: Takes BER octetstream and decode it into an ASN.1 object +#: Takes BER octet-stream and decode it into an ASN.1 object #: (e.g. :py:class:`~pyasn1.type.base.PyAsn1Item` derivative) which #: may be a scalar or an arbitrary nested structure. #: #: Parameters #: ---------- #: substrate: :py:class:`bytes` (Python 3) or :py:class:`str` (Python 2) -#: BER octetstream +#: BER octet-stream #: +#: Keyword Args +#: ------------ #: asn1Spec: any pyasn1 type object e.g. :py:class:`~pyasn1.type.base.PyAsn1Item` derivative #: A pyasn1 type object to act as a template guiding the decoder. Depending on the ASN.1 structure #: being decoded, *asn1Spec* may or may not be required. Most common reason for diff --git a/pyasn1/codec/ber/encoder.py b/pyasn1/codec/ber/encoder.py index 3f19c8a..c8eac34 100644 --- a/pyasn1/codec/ber/encoder.py +++ b/pyasn1/codec/ber/encoder.py @@ -646,6 +646,8 @@ class Encoder(object): #: A Python or pyasn1 object to encode. If Python object is given, `asnSpec` #: parameter is required to guide the encoding process. #: +#: Keyword Args +#: ------------ #: asn1Spec: #: Optional ASN.1 schema or value object e.g. :py:class:`~pyasn1.type.base.PyAsn1Item` derivative #: diff --git a/pyasn1/codec/cer/decoder.py b/pyasn1/codec/cer/decoder.py index a93b9a6..3cc29c7 100644 --- a/pyasn1/codec/cer/decoder.py +++ b/pyasn1/codec/cer/decoder.py @@ -63,15 +63,17 @@ class Decoder(decoder.Decoder): #: Turns CER octet stream into an ASN.1 object. #: -#: Takes CER octetstream and decode it into an ASN.1 object +#: Takes CER octet-stream and decode it into an ASN.1 object #: (e.g. :py:class:`~pyasn1.type.base.PyAsn1Item` derivative) which #: may be a scalar or an arbitrary nested structure. #: #: Parameters #: ---------- #: substrate: :py:class:`bytes` (Python 3) or :py:class:`str` (Python 2) -#: CER octetstream +#: CER octet-stream #: +#: Keyword Args +#: ------------ #: asn1Spec: any pyasn1 type object e.g. :py:class:`~pyasn1.type.base.PyAsn1Item` derivative #: A pyasn1 type object to act as a template guiding the decoder. Depending on the ASN.1 structure #: being decoded, *asn1Spec* may or may not be required. Most common reason for diff --git a/pyasn1/codec/cer/encoder.py b/pyasn1/codec/cer/encoder.py index 8acd580..b4c68ec 100644 --- a/pyasn1/codec/cer/encoder.py +++ b/pyasn1/codec/cer/encoder.py @@ -257,13 +257,15 @@ class Encoder(encoder.Encoder): #: A Python or pyasn1 object to encode. If Python object is given, `asnSpec` #: parameter is required to guide the encoding process. #: +#: Keyword Args +#: ------------ #: asn1Spec: #: Optional ASN.1 schema or value object e.g. :py:class:`~pyasn1.type.base.PyAsn1Item` derivative #: #: Returns #: ------- #: : :py:class:`bytes` (Python 3) or :py:class:`str` (Python 2) -#: Given ASN.1 object encoded into BER octetstream +#: Given ASN.1 object encoded into BER octet-stream #: #: Raises #: ------ diff --git a/pyasn1/codec/der/decoder.py b/pyasn1/codec/der/decoder.py index 4977a05..1da37a0 100644 --- a/pyasn1/codec/der/decoder.py +++ b/pyasn1/codec/der/decoder.py @@ -43,15 +43,17 @@ class Decoder(decoder.Decoder): #: Turns DER octet stream into an ASN.1 object. #: -#: Takes DER octetstream and decode it into an ASN.1 object +#: Takes DER octet-stream and decode it into an ASN.1 object #: (e.g. :py:class:`~pyasn1.type.base.PyAsn1Item` derivative) which #: may be a scalar or an arbitrary nested structure. #: #: Parameters #: ---------- #: substrate: :py:class:`bytes` (Python 3) or :py:class:`str` (Python 2) -#: DER octetstream +#: DER octet-stream #: +#: Keyword Args +#: ------------ #: asn1Spec: any pyasn1 type object e.g. :py:class:`~pyasn1.type.base.PyAsn1Item` derivative #: A pyasn1 type object to act as a template guiding the decoder. Depending on the ASN.1 structure #: being decoded, *asn1Spec* may or may not be required. Most common reason for diff --git a/pyasn1/codec/der/encoder.py b/pyasn1/codec/der/encoder.py index 0a39e71..8496252 100644 --- a/pyasn1/codec/der/encoder.py +++ b/pyasn1/codec/der/encoder.py @@ -70,13 +70,15 @@ class Encoder(encoder.Encoder): #: A Python or pyasn1 object to encode. If Python object is given, `asnSpec` #: parameter is required to guide the encoding process. #: +#: Keyword Args +#: ------------ #: asn1Spec: #: Optional ASN.1 schema or value object e.g. :py:class:`~pyasn1.type.base.PyAsn1Item` derivative #: #: Returns #: ------- #: : :py:class:`bytes` (Python 3) or :py:class:`str` (Python 2) -#: Given ASN.1 object encoded into BER octetstream +#: Given ASN.1 object encoded into BER octet-stream #: #: Raises #: ------ diff --git a/pyasn1/codec/native/decoder.py b/pyasn1/codec/native/decoder.py index e5d0a53..cd60649 100644 --- a/pyasn1/codec/native/decoder.py +++ b/pyasn1/codec/native/decoder.py @@ -177,6 +177,8 @@ class Decoder(object): #: pyObject: :py:class:`object` #: A scalar or nested Python objects #: +#: Keyword Args +#: ------------ #: asn1Spec: any pyasn1 type object e.g. :py:class:`~pyasn1.type.base.PyAsn1Item` derivative #: A pyasn1 type object to act as a template guiding the decoder. It is required #: for successful interpretation of Python objects mapping into their ASN.1 |