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

tweaks

parent e1bf7c35
Pipeline #1214 failed with stage
in 0 seconds
......@@ -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.
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment