From cf780b3ca3ca533c841d2f01ad39431cc6e0ba4b Mon Sep 17 00:00:00 2001 From: Leonardo Bautista-Gomez Date: Wed, 8 Feb 2023 22:45:01 +0100 Subject: [PATCH] Starting code documentation --- DAS/block.py | 2 +- DAS/tools.py | 3 ++- doc/index.rst | 12 +++++++----- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/DAS/block.py b/DAS/block.py index 1cea8c0..a22b70c 100644 --- a/DAS/block.py +++ b/DAS/block.py @@ -5,7 +5,7 @@ from bitarray import bitarray from bitarray.util import zeros class Block: - + """This class represents a block in the Ethereum blockchain""" def __init__(self, blockSize): self.blockSize = blockSize diff --git a/DAS/tools.py b/DAS/tools.py index b9e4a8e..68469fe 100644 --- a/DAS/tools.py +++ b/DAS/tools.py @@ -2,7 +2,8 @@ import logging -class CustomFormatter(logging.Formatter): +class CustomFormatter(): + """This class defines the terminal output formatting.""" blue = "\x1b[34;20m" grey = "\x1b[38;20m" diff --git a/doc/index.rst b/doc/index.rst index f6b5fc9..e253201 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -6,6 +6,13 @@ Welcome to DAS simulator's documentation! ========================================= +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` + .. toctree:: :maxdepth: 2 :caption: Contents: @@ -34,9 +41,4 @@ Welcome to DAS simulator's documentation! .. automodule:: validator :members: -Indices and tables -================== -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search`