Commits

sirgazil committed f32700e Draft

Added source code docstrings revision (close #6)

  • Participants
  • Parent commits f57b60d
  • Branches 1.0.2

Comments (0)

Files changed (6)

         pass
 
     def bold(self, string):
-        """Print a bold string."""
+        """Print a bold string.
+        
+        Parameters:
+
+        ``string`` (str): the text you want to print in bold.
+        
+        """
         self.turn_bold()
         print(string)
         self.turn_fx_off()
 
     def color(self, string, fg_color="White", bg_color="", bold=False):
-        """Print a colored string."""
+        """Print a colored string.
+        
+        Parameters:
+
+        ``string`` (str): the text you want to print in bold.
+        
+        ``fg_color`` (str): the name of the foreground color. It can be
+        Black, Red, Green, Yellow, Blue, Magenta, Cyan and White.
+        
+        ``bg_color`` (str): the name of the background color. Accepts the
+        same colors available for the foreground.
+        
+        ``bold`` (bool): indicates if the string should be printed in bold
+        as well.
+        
+        """
         self.set_fg_color(fg_color)
         self.set_bg_color(bg_color)
         if bold:
         ``color`` indicated until the :py:meth:`Display.turn_fx_off()`
         method is called.
 
-        Parameters
+        Parameters:
 
         ``color`` (str): the name of the color. It can be Black, Red, Green,
         Yellow, Blue, Magenta, Cyan and White.
         in the ``color`` indicated until the :py:meth:`Display.turn_fx_off()`
         method is called.
 
-        Parameters
+        Parameters:
 
         ``color`` (str): the name of the color. It can be Black, Red, Green,
         Yellow, Blue, Magenta, Cyan and White.

docs/source/api/colorin.rst

+API Reference
+=============
+
+.. automodule:: colorin.__init__
+    :members:
+    :undoc-members:
+    :show-inheritance:
+
+
+:mod:`colorin.cli` Module
+-------------------------
+
+.. automodule:: colorin.cli
+    :members:
+    :undoc-members:
+    :show-inheritance:
+

docs/source/api/modules.rst

+colorin
+=======
+
+.. toctree::
+   :maxdepth: 4
+
+   colorin

docs/source/colorin/colorin.rst

-colorin Package
-===============
-
-:mod:`colorin` Package
-----------------------
-
-.. automodule:: colorin.__init__
-    :members:
-    :undoc-members:
-    :show-inheritance:
-
-:mod:`cli` Module
------------------
-
-.. automodule:: colorin.cli
-    :members:
-    :undoc-members:
-    :show-inheritance:
-

docs/source/colorin/modules.rst

-colorin
-=======
-
-.. toctree::
-   :maxdepth: 4
-
-   colorin

docs/source/index.rst

    license
    install
    usage
-   API Reference <colorin/modules>
+   api/colorin