]> Cypherpunks.ru repositories - pyderasn.git/commitdiff
More seealso directive usage
authorSergey Matveev <stargrave@stargrave.org>
Tue, 18 Feb 2020 07:15:44 +0000 (10:15 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Tue, 18 Feb 2020 07:21:37 +0000 (10:21 +0300)
doc/examples.rst
pyderasn.py

index a0f7ee081d3400f9db27a80c5cfe7a9847138ff9..ddc2d0ecf74e109150b30b4860b70fd6067ef515 100644 (file)
@@ -184,12 +184,12 @@ it's DER encoded representation is already in ``raw`` variable)::
         serialNumber: CertificateSerialNumber INTEGER 61595;
         signature: AlgorithmIdentifier SEQUENCE[OBJECT IDENTIFIER 1.2.840.113549.1.1.5...
 
-:ref:`Look here <pprint_example>` for better pretty printing.
+.. seealso:: :ref:`Better pretty printing <pprint_example>`
 
 As command line utility
 -----------------------
 
-:ref:`Look here <cmdline>`.
+.. seealso:: :ref:`cmdline`
 
 Descriptive errors
 ------------------
@@ -327,8 +327,8 @@ printer will show::
                         . . . . . . . 74:73:20:50:74:79:20:4C:74:64
        95   [1,1,  24]  . . . . . . . DEFINED BY (2.5.4.10): PrintableString PrintableString Internet Widgits Pty Ltd
 
-:ref:`Read more <definedby>` about that feature.
+.. seealso:: :ref:`definedby`
 
 Streaming and dealing with huge structures
 ------------------------------------------
-:ref:`Look here <streaming>`.
+.. seealso:: :ref:`streaming`
index c9d6a116044b5515b0f75b6b5271327345106f6d..62e884ba9357bfc49f21f77c19c7cd90fe21f954 100755 (executable)
@@ -763,6 +763,8 @@ forcefully encoded in DER during CER encoding, by specifying
         bounds = (1, 32)
         der_forced = True
 
+.. _agg_octet_string:
+
 agg_octet_string
 ________________
 
@@ -1759,13 +1761,13 @@ class Obj(object):
 
     @property
     def tlen(self):
-        """See :ref:`decoding`
+        """.. seealso:: :ref:`decoding`
         """
         return len(self.tag)
 
     @property
     def tlvlen(self):
-        """See :ref:`decoding`
+        """.. seealso:: :ref:`decoding`
         """
         return self.tlen + self.llen + self.vlen
 
@@ -1921,7 +1923,8 @@ class Obj(object):
 
         That method is identical to :py:meth:`pyderasn.Obj.decode`, but
         it returns the generator producing ``(decode_path, obj, tail)``
-        values. See :ref:`evgen mode <evgen_mode>`.
+        values.
+        .. seealso:: :ref:`evgen mode <evgen_mode>`.
         """
         if ctx is None:
             ctx = {}
@@ -2070,25 +2073,25 @@ class Obj(object):
 
     @property
     def expled(self):
-        """See :ref:`decoding`
+        """.. seealso:: :ref:`decoding`
         """
         return self._expl is not None
 
     @property
     def expl_tag(self):
-        """See :ref:`decoding`
+        """.. seealso:: :ref:`decoding`
         """
         return self._expl
 
     @property
     def expl_tlen(self):
-        """See :ref:`decoding`
+        """.. seealso:: :ref:`decoding`
         """
         return len(self._expl)
 
     @property
     def expl_llen(self):
-        """See :ref:`decoding`
+        """.. seealso:: :ref:`decoding`
         """
         if self.expl_lenindef:
             return 1
@@ -2096,31 +2099,31 @@ class Obj(object):
 
     @property
     def expl_offset(self):
-        """See :ref:`decoding`
+        """.. seealso:: :ref:`decoding`
         """
         return self.offset - self.expl_tlen - self.expl_llen
 
     @property
     def expl_vlen(self):
-        """See :ref:`decoding`
+        """.. seealso:: :ref:`decoding`
         """
         return self.tlvlen
 
     @property
     def expl_tlvlen(self):
-        """See :ref:`decoding`
+        """.. seealso:: :ref:`decoding`
         """
         return self.expl_tlen + self.expl_llen + self.expl_vlen
 
     @property
     def fulloffset(self):
-        """See :ref:`decoding`
+        """.. seealso:: :ref:`decoding`
         """
         return self.expl_offset if self.expled else self.offset
 
     @property
     def fulllen(self):
-        """See :ref:`decoding`
+        """.. seealso:: :ref:`decoding`
         """
         return self.expl_tlvlen if self.expled else self.tlvlen
 
@@ -4074,6 +4077,8 @@ def agg_octet_string(evgens, decode_path, raw, writer):
     :param writer: buffer.write where string is going to be saved
     :param writer: where string is going to be saved. Must comply
                    with ``io.RawIOBase.write`` behaviour
+
+    .. seealso:: :ref:`agg_octet_string`
     """
     decode_path_len = len(decode_path)
     for dp, obj, _ in evgens:
@@ -4291,7 +4296,9 @@ class ObjectIdentifier(Obj):
                         tuple element is ``{OID: pyderasn.Obj()}``
                         dictionary, mapping between current OID value
                         and structure applied to defined field.
-                        :ref:`Read about DEFINED BY <definedby>`
+
+                        .. seealso:: :ref:`definedby`
+
         :param bytes impl: override default tag with ``IMPLICIT`` one
         :param bytes expl: override default tag with ``EXPLICIT`` one
         :param default: set default value. Type same as in ``value``