Commit 4a29da41 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

excluded linenos for copybutton

parent d20d611f
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -4,5 +4,6 @@ joblib==1.2.0
setuptools==58.0.4
astropy==5.1
pycodestyle==2.9.1
sphinx_copybutton==0.5.0
#sphinx_copybutton==0.5.0 # this does not exclude linenos
git+https://github.com/executablebooks/sphinx-copybutton.git
git+https://csst-tb.bao.ac.cn/code/csst-l1/csst_common.git
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -35,6 +35,8 @@ release = '0.0.1alpha'
# ones.
extensions = ["recommonmark",
              "sphinx_copybutton",
              "sphinx_togglebutton",
              # "sphinx_exec_code",
              "sphinx.ext.autodoc",
              "sphinx.ext.napoleon",
              "sphinx.ext.viewcode",
@@ -68,3 +70,6 @@ html_static_path = ['_static']
# latex_elements = {
#     'preamble': '\\usepackage[UTF8]{ctex}\n',
# }

# -- Copy Button --------------------------------------------------------
# copybutton_exclude = ['.linenos']
+3 −1
Original line number Diff line number Diff line
@@ -70,11 +70,12 @@ Get the default configured ``logging.Logger``.


.. code-block:: python
    :linenos:

    from csst_common.logger import get_logger
    logger = get_logger()

.. note::
.. warning::
    Developers should NOT use ``print`` function extensively in code.
    Generally ``print`` can be replaced with ``logger.debug("msg")``.
    For important information, use ``logger.info("msg")``.
@@ -91,6 +92,7 @@ Developers should use ``csst_common.status.CsstStatus`` to return the
status of their interfaces.

.. code-block:: python
    :linenos:

    from csst_common.status import CsstStatus
    # presently 3 kinds of status are available, they are
+1 −1
Original line number Diff line number Diff line
@@ -4,4 +4,4 @@ joblib==1.2.0
setuptools==58.0.4
astropy==5.1
pycodestyle==2.9.1
sphinx_copybutton==0.5.0
 No newline at end of file
git+https://github.com/executablebooks/sphinx-copybutton.git
 No newline at end of file