Skip to content

Commit

Permalink
Merge pull request #6341 from tekktrik/doc/add-time-module-link
Browse files Browse the repository at this point in the history
Link to CPython docs for subset modules
  • Loading branch information
dhalbert authored May 3, 2022
2 parents 4da73ac + 024ab19 commit e5c9f3b
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 13 deletions.
1 change: 1 addition & 0 deletions shared-bindings/atexit/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
//| These functions are run in the reverse order in which they were registered;
//| if you register ``A``, ``B``, and ``C``, they will be run in the order ``C``, ``B``, ``A``.
//|
//| |see_cpython_module| :mod:`cpython:atexit`.
//| """
//| ...
//|
Expand Down
5 changes: 4 additions & 1 deletion shared-bindings/math/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@
//| """mathematical functions
//|
//| The `math` module provides some basic mathematical functions for
//| working with floating-point numbers."""
//| working with floating-point numbers.
//|
//| |see_cpython_module| :mod:`cpython:math`.
//| """
//|

STATIC NORETURN void math_error(void) {
Expand Down
5 changes: 2 additions & 3 deletions shared-bindings/os/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@

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

Expand Down
4 changes: 1 addition & 3 deletions shared-bindings/random/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@

//| """pseudo-random numbers and choices
//|
//| The `random` module is a strict subset of the CPython `cpython:random`
//| module. So, code written in CircuitPython will work in CPython but not
//| necessarily the other way around.
//| |see_cpython_module| :mod:`cpython:random`.
//|
//| Like its CPython cousin, CircuitPython's random seeds itself on first use
//| with a true random from os.urandom() when available or the uptime otherwise.
Expand Down
3 changes: 3 additions & 0 deletions shared-bindings/socketpool/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@
//| """
//| The `socketpool` module provides sockets through a pool. The pools themselves
//| act like CPython's `socket` module.
//|
//| For more information about the `socket` module, see the CPython documentation:
//| https://docs.python.org/3/library/socket.html
//| """
//|

Expand Down
2 changes: 2 additions & 0 deletions shared-bindings/ssl/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@

//| """
//| The `ssl` module provides SSL contexts to wrap sockets in.
//|
//| |see_cpython_module| :mod:`cpython:ssl`.
//| """
//|

Expand Down
4 changes: 1 addition & 3 deletions shared-bindings/struct/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,7 @@

//| """Manipulation of c-style data
//|
//| This module implements a subset of the corresponding CPython module,
//| as described below. For more information, refer to the original CPython
//| documentation: struct.
//| |see_cpython_module| :mod:`cpython:struct`.
//|
//| Supported size/byte order prefixes: *@*, *<*, *>*, *!*.
//|
Expand Down
5 changes: 2 additions & 3 deletions shared-bindings/time/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@

//| """time and timing related functions
//|
//| The `time` module is a strict subset of the CPython `cpython:time` module. So, code
//| using `time` written in CircuitPython will work in CPython but not necessarily the other
//| way around."""
//| |see_cpython_module| :mod:`cpython:time`.
//| """
//|
//| def monotonic() -> float:
//| """Returns an always increasing value of time with an unknown reference
Expand Down
1 change: 1 addition & 0 deletions shared-bindings/traceback/__init__.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
//| This module provides a standard interface to print stack traces of programs.
//| This is useful when you want to print stack traces under program control.
//|
//| |see_cpython_module| :mod:`cpython:traceback`.
//| """
//| ...
//|
Expand Down

0 comments on commit e5c9f3b

Please sign in to comment.