Skip to content

Commit f8ac289

Browse files
committed
docs/{micropython,sys,uos}: Use markup adhering to the latest docs conventions.
1 parent 3e82bed commit f8ac289

3 files changed

Lines changed: 26 additions & 26 deletions

File tree

docs/library/micropython.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,30 @@ Functions
2323
variable, and does not take up any memory during execution.
2424

2525
This `const` function is recognised directly by the MicroPython parser and is
26-
provided as part of the `micropython` module mainly so that scripts can be
26+
provided as part of the :mod:`micropython` module mainly so that scripts can be
2727
written which run under both CPython and MicroPython, by following the above
2828
pattern.
2929

3030
.. function:: opt_level([level])
3131

32-
If `level` is given then this function sets the optimisation level for subsequent
33-
compilation of scripts, and returns `None`. Otherwise it returns the current
32+
If *level* is given then this function sets the optimisation level for subsequent
33+
compilation of scripts, and returns ``None``. Otherwise it returns the current
3434
optimisation level.
3535

3636
.. function:: alloc_emergency_exception_buf(size)
3737

38-
Allocate ``size`` bytes of RAM for the emergency exception buffer (a good
38+
Allocate *size* bytes of RAM for the emergency exception buffer (a good
3939
size is around 100 bytes). The buffer is used to create exceptions in cases
4040
when normal RAM allocation would fail (eg within an interrupt handler) and
4141
therefore give useful traceback information in these situations.
4242

4343
A good way to use this function is to put it at the start of your main script
44-
(eg boot.py or main.py) and then the emergency exception buffer will be active
44+
(eg ``boot.py`` or ``main.py``) and then the emergency exception buffer will be active
4545
for all the code following it.
4646

4747
.. function:: mem_info([verbose])
4848

49-
Print information about currently used memory. If the ``verbose`` argument
49+
Print information about currently used memory. If the *verbose`* argument
5050
is given then extra information is printed.
5151

5252
The information that is printed is implementation dependent, but currently
@@ -55,7 +55,7 @@ Functions
5555

5656
.. function:: qstr_info([verbose])
5757

58-
Print information about currently interned strings. If the ``verbose``
58+
Print information about currently interned strings. If the *verbose*
5959
argument is given then extra information is printed.
6060

6161
The information that is printed is implementation dependent, but currently
@@ -89,10 +89,10 @@ Functions
8989
incoming stream of characters that is usually used for the REPL, in case
9090
that stream is used for other purposes.
9191

92-
.. function:: schedule(fun, arg)
92+
.. function:: schedule(func, arg)
9393

94-
Schedule the function `fun` to be executed "very soon". The function
95-
is passed the value `arg` as its single argument. "very soon" means that
94+
Schedule the function *func* to be executed "very soon". The function
95+
is passed the value *arg* as its single argument. "Very soon" means that
9696
the MicroPython runtime will do its best to execute the function at the
9797
earliest possible time, given that it is also trying to be efficient, and
9898
that the following conditions hold:

docs/library/sys.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ Functions
1010
.. function:: exit(retval=0)
1111

1212
Terminate current program with a given exit code. Underlyingly, this
13-
function raise as ``SystemExit`` exception. If an argument is given, its
14-
value given as an argument to ``SystemExit``.
13+
function raise as `SystemExit` exception. If an argument is given, its
14+
value given as an argument to `SystemExit`.
1515

1616
.. function:: print_exception(exc, file=sys.stdout)
1717

18-
Print exception with a traceback to a file-like object `file` (or
19-
``sys.stdout`` by default).
18+
Print exception with a traceback to a file-like object *file* (or
19+
`sys.stdout` by default).
2020

2121
.. admonition:: Difference to CPython
2222
:class: attention
2323

2424
This is simplified version of a function which appears in the
2525
``traceback`` module in CPython. Unlike ``traceback.print_exception()``,
2626
this function takes just exception value instead of exception type,
27-
exception value, and traceback object; `file` argument should be
27+
exception value, and traceback object; *file* argument should be
2828
positional; further arguments are not supported. CPython-compatible
2929
``traceback`` module can be found in micropython-lib.
3030

@@ -37,15 +37,15 @@ Constants
3737

3838
.. data:: byteorder
3939

40-
The byte order of the system ("little" or "big").
40+
The byte order of the system (``"little"`` or ``"big"``).
4141

4242
.. data:: implementation
4343

4444
Object with information about the current Python implementation. For
4545
MicroPython, it has following attributes:
4646

47-
* `name` - string "micropython"
48-
* `version` - tuple (major, minor, micro), e.g. (1, 7, 0)
47+
* *name* - string "micropython"
48+
* *version* - tuple (major, minor, micro), e.g. (1, 7, 0)
4949

5050
This object is the recommended way to distinguish MicroPython from other
5151
Python implementations (note that it still may not exist in the very
@@ -95,10 +95,10 @@ Constants
9595

9696
The platform that MicroPython is running on. For OS/RTOS ports, this is
9797
usually an identifier of the OS, e.g. ``"linux"``. For baremetal ports it
98-
is an identifier of a board, e.g. "pyboard" for the original MicroPython
98+
is an identifier of a board, e.g. ``"pyboard"`` for the original MicroPython
9999
reference board. It thus can be used to distinguish one board from another.
100100
If you need to check whether your program runs on MicroPython (vs other
101-
Python implementation), use ``sys.implementation`` instead.
101+
Python implementation), use `sys.implementation` instead.
102102

103103
.. data:: stderr
104104

docs/library/uos.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ Functions
2222

2323
This function returns an iterator which then yields 3-tuples corresponding to
2424
the entries in the directory that it is listing. With no argument it lists the
25-
current directory, otherwise it lists the directory given by `dir`.
25+
current directory, otherwise it lists the directory given by *dir*.
2626

27-
The 3-tuples have the form `(name, type, inode)`:
27+
The 3-tuples have the form *(name, type, inode)*:
2828

29-
- `name` is a string (or bytes if `dir` is a bytes object) and is the name of
29+
- *name* is a string (or bytes if *dir* is a bytes object) and is the name of
3030
the entry;
31-
- `type` is an integer that specifies the type of the entry, with 0x4000 for
31+
- *type* is an integer that specifies the type of the entry, with 0x4000 for
3232
directories and 0x8000 for regular files;
33-
- `inode` is an integer corresponding to the inode of the file, and may be 0
33+
- *inode* is an integer corresponding to the inode of the file, and may be 0
3434
for filesystems that don't have such a notion.
3535

3636
.. function:: listdir([dir])
@@ -90,5 +90,5 @@ Functions
9090
.. function:: dupterm(stream_object)
9191

9292
Duplicate or switch MicroPython terminal (the REPL) on the passed stream-like
93-
object. The given object must implement the `.readinto()` and `.write()`
93+
object. The given object must implement the ``readinto()`` and ``write()``
9494
methods. If ``None`` is passed, previously set redirection is cancelled.

0 commit comments

Comments
 (0)