Skip to content

Commit e5c9f3b

Browse files
authored
Merge pull request #6341 from tekktrik/doc/add-time-module-link
Link to CPython docs for subset modules
2 parents 4da73ac + 024ab19 commit e5c9f3b

File tree

9 files changed

+17
-13
lines changed

9 files changed

+17
-13
lines changed

shared-bindings/atexit/__init__.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
//| These functions are run in the reverse order in which they were registered;
3535
//| if you register ``A``, ``B``, and ``C``, they will be run in the order ``C``, ``B``, ``A``.
3636
//|
37+
//| |see_cpython_module| :mod:`cpython:atexit`.
3738
//| """
3839
//| ...
3940
//|

shared-bindings/math/__init__.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,10 @@
4141
//| """mathematical functions
4242
//|
4343
//| The `math` module provides some basic mathematical functions for
44-
//| working with floating-point numbers."""
44+
//| working with floating-point numbers.
45+
//|
46+
//| |see_cpython_module| :mod:`cpython:math`.
47+
//| """
4548
//|
4649

4750
STATIC NORETURN void math_error(void) {

shared-bindings/os/__init__.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,8 @@
3939

4040
//| """functions that an OS normally provides
4141
//|
42-
//| The `os` module is a strict subset of the CPython `cpython:os` module. So,
43-
//| code written in CircuitPython will work in CPython but not necessarily the
44-
//| other way around."""
42+
//| |see_cpython_module| :mod:`cpython:os`.
43+
//| """
4544
//|
4645
//| import typing
4746

shared-bindings/random/__init__.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@
3535

3636
//| """pseudo-random numbers and choices
3737
//|
38-
//| The `random` module is a strict subset of the CPython `cpython:random`
39-
//| module. So, code written in CircuitPython will work in CPython but not
40-
//| necessarily the other way around.
38+
//| |see_cpython_module| :mod:`cpython:random`.
4139
//|
4240
//| Like its CPython cousin, CircuitPython's random seeds itself on first use
4341
//| with a true random from os.urandom() when available or the uptime otherwise.

shared-bindings/socketpool/__init__.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@
3535
//| """
3636
//| The `socketpool` module provides sockets through a pool. The pools themselves
3737
//| act like CPython's `socket` module.
38+
//|
39+
//| For more information about the `socket` module, see the CPython documentation:
40+
//| https://docs.python.org/3/library/socket.html
3841
//| """
3942
//|
4043

shared-bindings/ssl/__init__.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333

3434
//| """
3535
//| The `ssl` module provides SSL contexts to wrap sockets in.
36+
//|
37+
//| |see_cpython_module| :mod:`cpython:ssl`.
3638
//| """
3739
//|
3840

shared-bindings/struct/__init__.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,7 @@
4040

4141
//| """Manipulation of c-style data
4242
//|
43-
//| This module implements a subset of the corresponding CPython module,
44-
//| as described below. For more information, refer to the original CPython
45-
//| documentation: struct.
43+
//| |see_cpython_module| :mod:`cpython:struct`.
4644
//|
4745
//| Supported size/byte order prefixes: *@*, *<*, *>*, *!*.
4846
//|

shared-bindings/time/__init__.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,8 @@
3838

3939
//| """time and timing related functions
4040
//|
41-
//| The `time` module is a strict subset of the CPython `cpython:time` module. So, code
42-
//| using `time` written in CircuitPython will work in CPython but not necessarily the other
43-
//| way around."""
41+
//| |see_cpython_module| :mod:`cpython:time`.
42+
//| """
4443
//|
4544
//| def monotonic() -> float:
4645
//| """Returns an always increasing value of time with an unknown reference

shared-bindings/traceback/__init__.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
//| This module provides a standard interface to print stack traces of programs.
3535
//| This is useful when you want to print stack traces under program control.
3636
//|
37+
//| |see_cpython_module| :mod:`cpython:traceback`.
3738
//| """
3839
//| ...
3940
//|

0 commit comments

Comments
 (0)