Commit fc0ad317 authored by BO ZHANG's avatar BO ZHANG 🏀
Browse files

tweaks

parent e1bf7c35
Loading
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -59,11 +59,15 @@ Relative import
---------------
When import a class / function within the same package, a ``relative import``
should be used instead of ``absolute import``.
An example is below (``top_level_interface.py``):
An example is below (``api.py``):

.. code-block:: python

    from .flip_image import flip_image, read_test_image
    from .demo import a_demo_function, ADemoClass

    __all__ = ["flip_image", "read_test_image", "a_demo_function", "ADemoClass"]

.. literalinclude:: ../../csst_proto/top_level_interface.py
   :linenos:
   :language: python

.. note::
    Note the ``.`` means it's a relative import.