Fix errors in api doc creation
[pyi2ncommon] / src / log_read.py
index 724f4e1..4eba2a4 100644 (file)
@@ -292,7 +292,7 @@ class IterativeReader(object):
 
         Intended for overwriting in subclasses.
 
-        This function is called from __iter__ for each new data that becomes
+        This function is called from `__iter__` for each new data that becomes
         available. It has to provide results which are forwarded to caller.
 
         This base implementation just yields its input, so new data is yielded
@@ -302,7 +302,7 @@ class IterativeReader(object):
                                 :py:data:`self.descriptions`
         :param str data: Text data read from source
         :param idx: Index of data source
-        :returns: nothing but yields [(description, data, idx], same as input
+        :returns: nothing but yields [(description, data, idx)], same as input
         """
         yield description, data, idx
 
@@ -330,6 +330,7 @@ class LineReader(IterativeReader):
         If line is not complete, then buffer it.
 
         Args: see super class method :py:meth:`IterativeReader.prepare_result`
+
         :returns: list of 3-tuples `(description, line, idx)` where
                   `description` and `idx` are same as args, and `line` is
                   without trailing newline characters
@@ -358,7 +359,7 @@ class LogParser(LineReader):
 
     Iteration returns :py:class:`re.match` result or -- if matching failed --
     None. The latest unparsed line is available as `self.last_unparsed_line`.
-    Usage recommendation:
+    Usage recommendation::
 
         with open(log_file_name, 'rt') as file_handle:
             parser = log_read.LogParser(file_handle, pattern=my_pattern):
@@ -389,6 +390,7 @@ class LogParser(LineReader):
         Try parsing lines.
 
         Args: see super class method :py:meth:`IterativeReader.prepare_result`
+
         :returns: 3-tuples `(description, line, idx)` where `description` and
                   `idx` are same as input args and `line` is either a
                   :py:class:`re.Match` if line matched :py:data:`self.pattern`
@@ -411,7 +413,7 @@ class LogParser(LineReader):
         """
         Open single file, yield LogParser. Ensures file is closed afterwards.
 
-        This allows opening file and creation LogParser for it to one line:
+        This allows opening file and creation LogParser for it to one line::
 
             with LogParser.create_for('/var/log/messages', SYS_LOG_PATTERN) as parser:
                 for _, matches, _ in parser: