From: Vladimír Vondruš Date: Thu, 26 Sep 2024 17:16:50 +0000 (+0200) Subject: documentation/python: test annotation special cases in a less hacky way. X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~cjwatson/git?a=commitdiff_plain;h=fe7f3d7983a8cd97f406504824bff521bef61e1d;p=blog.git documentation/python: test annotation special cases in a less hacky way. We can just pull those into a custom module with __all__, no need to modify directly math.__all__. This also means we don't need to worry about the module-level docstring. --- diff --git a/documentation/test_python/inspect_annotations/math373.html b/documentation/test_python/inspect_annotations/math373.html deleted file mode 100644 index 226e28ed..00000000 --- a/documentation/test_python/inspect_annotations/math373.html +++ /dev/null @@ -1,68 +0,0 @@ - - - - - math | My Python Project - - - - - -
-
-
-
-
-

- math module -

-

This module is always available. It provides access to the -mathematical functions defined by the C standard.

- -
-

Functions

-
-
- def pow(x, y, /) -
-
Return x**y (x to the power of y).
-
- def log(...) -
-
log(x, [base=math.e]) -Return the logarithm of x to the given base.
-
-
-
-

Function documentation

-
-

- def math.log(...) -

-

log(x, [base=math.e]) -Return the logarithm of x to the given base.

-

If the base not specified, returns the natural logarithm (base e) of x.

-
-
-
-
-
-
- - diff --git a/documentation/test_python/inspect_annotations/math.html b/documentation/test_python/inspect_builtin/inspect_builtin.html similarity index 83% rename from documentation/test_python/inspect_annotations/math.html rename to documentation/test_python/inspect_builtin/inspect_builtin.html index 982c3150..74a2585c 100644 --- a/documentation/test_python/inspect_annotations/math.html +++ b/documentation/test_python/inspect_builtin/inspect_builtin.html @@ -2,7 +2,7 @@ - math | My Python Project + inspect_builtin | My Python Project @@ -20,10 +20,8 @@

- math module + inspect_builtin module

-

This module provides access to the mathematical functions -defined by the C standard.