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):
Args:
user_target_pos: destination (user units)
Keyword Args:
wait (bool): wait or not for end of motion
relative (bool): False if *user_target_pos* is given in absolute \
position or True if it is given in relative position
polling_time (float): motion loop polling time (seconds)
Raises:
RuntimeError
Returns:
None
"""
if numpy.isfinite(user_target_pos):
......
......@@ -228,14 +228,15 @@ the string on its own line:
"""
```
Bliss supports *napoleon* sphinx extension. The recommended way to
document API is to follow the [Google Python Style
Bliss supports [*napoleon* sphinx
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):
``` python
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:
using `wait=True` will block the current :class:`~gevent.Greenlet`.
......@@ -243,6 +244,10 @@ Guide](http://google.github.io/styleguide/pyguide.html):
See Also:
:func:`rmove`
code example: ``register(self, children_list=[self.comm]) # comm layer``
`This will be printed in italic`
Args:
axis (Axis): instance of bliss :class:`bliss.common.axis.Axis`
position (float): position (axis units)
......@@ -250,10 +255,19 @@ Guide](http://google.github.io/styleguide/pyguide.html):
Returns:
float: actual position where motor is (axis units)
Raises:
RuntimeError
"""
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
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