Commit 04bd2546 authored by Cyril Guilloud's avatar Cyril Guilloud
Browse files

comments on final s in doc.

parent 0fe8a6a7
Pipeline #43498 passed with stages
in 97 minutes and 3 seconds
...@@ -1843,11 +1843,19 @@ class Axis(Scannable): ...@@ -1843,11 +1843,19 @@ class Axis(Scannable):
Args: Args:
user_target_pos: destination (user units) user_target_pos: destination (user units)
Keyword Args: Keyword Args:
wait (bool): wait or not for end of motion wait (bool): wait or not for end of motion
relative (bool): False if *user_target_pos* is given in absolute \ relative (bool): False if *user_target_pos* is given in absolute \
position or True if it is given in relative position position or True if it is given in relative position
polling_time (float): motion loop polling time (seconds) polling_time (float): motion loop polling time (seconds)
Raises:
RuntimeError
Returns:
None
""" """
if numpy.isfinite(user_target_pos): if numpy.isfinite(user_target_pos):
......
...@@ -228,14 +228,15 @@ the string on its own line: ...@@ -228,14 +228,15 @@ the string on its own line:
""" """
``` ```
Bliss supports *napoleon* sphinx extension. The recommended way to Bliss supports [*napoleon* sphinx
document API is to follow the [Google Python Style extension](https://www.sphinx-doc.org/en/master/usage/extensions/napoleon.html). The
recommended way to document API is to follow the [Google Python Style
Guide](http://google.github.io/styleguide/pyguide.html): Guide](http://google.github.io/styleguide/pyguide.html):
``` python ``` python
def move(axis, position, wait=False): def move(axis, position, wait=False):
""" """
move the given axis to the given absolute position Move the given axis to the given absolute position
Note: Note:
using `wait=True` will block the current :class:`~gevent.Greenlet`. using `wait=True` will block the current :class:`~gevent.Greenlet`.
...@@ -243,6 +244,10 @@ Guide](http://google.github.io/styleguide/pyguide.html): ...@@ -243,6 +244,10 @@ Guide](http://google.github.io/styleguide/pyguide.html):
See Also: See Also:
:func:`rmove` :func:`rmove`
code example: ``register(self, children_list=[self.comm]) # comm layer``
`This will be printed in italic`
Args: Args:
axis (Axis): instance of bliss :class:`bliss.common.axis.Axis` axis (Axis): instance of bliss :class:`bliss.common.axis.Axis`
position (float): position (axis units) position (float): position (axis units)
...@@ -250,10 +255,19 @@ Guide](http://google.github.io/styleguide/pyguide.html): ...@@ -250,10 +255,19 @@ Guide](http://google.github.io/styleguide/pyguide.html):
Returns: Returns:
float: actual position where motor is (axis units) float: actual position where motor is (axis units)
Raises:
RuntimeError
""" """
pass pass
``` ```
!!!note
**Move** takes no final **s** to follow [PEP257 coding
convention](https://www.python.org/dev/peps/pep-0257/#one-line-docstrings)
**Raises**, **Returns** take a final **s** as they are sphinx keywords.
(Returns has Return as alias so... this is just a quesiton or convention)
## Comments ## Comments
Rules for comments are similar to docstrings. Both are formatted with Rules for comments are similar to docstrings. Both are formatted with
......
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