Skip to content

Commit 8fe2d7b

Browse files
authored
Disable sphinx-autodoc rendering for type hints (#33)
1 parent 4c0fba2 commit 8fe2d7b

File tree

6 files changed

+12
-8
lines changed

6 files changed

+12
-8
lines changed

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
run: python -m pip install --no-deps -e .
3939

4040
- name: Build docs
41-
run: sphinx-build -n -j auto -b html -d build/doctrees doc build/html
41+
run: sphinx-build -W -n -j auto -b html -d build/doctrees doc build/html
4242

4343
- uses: actions/upload-artifact@v4
4444
with:

.readthedocs.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ python:
1616
sphinx:
1717
builder: html
1818
configuration: doc/conf.py
19+
# This is deliberately laxer than the setting in CI
1920
fail_on_warning: false

doc/conf.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,6 +297,9 @@
297297
"scipy": ("https://docs.scipy.org/doc/scipy/reference/", None),
298298
}
299299

300+
# Configuration for sphinx-autodoc
301+
autodoc_typehints = "none"
302+
300303
# Hack around intersphinx issue caused by :show-inheritance:
301304
import dask.array # isort:skip # noqa: E402
302305

pyscenarios/_sobol/_sobol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def sobol(
6969
`Stephen Joe and Frances Y. Kuo <https://web.maths.unsw.edu.au/~fkuo/sobol/>`_,
7070
using directions from the file ``new-joe-kuo-6.21201`` linked above.
7171
72-
:param size:
72+
:param int | tuple[int, int] size:
7373
number of samples (cannot be greater than :math:`2^{32}`) to extract
7474
from a single dimension, or tuple (samples, dimensions).
7575
To guarantee uniform distribution, the number of samples should

pyscenarios/copula.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def gaussian_copula(
5353
>>> y = numpy.random.standard_normal(size=(samples, cov.shape[0]))
5454
>>> p = (l @ y.T).T
5555
56-
:param ArrayLike cov:
56+
:param cov:
5757
covariance matrix, a.k.a. correlation matrix. It must be a
5858
Hermitian, positive-definite matrix in any square array-like format.
5959
The width of cov determines the number of dimensions of the output.
@@ -151,12 +151,12 @@ def t_copula(
151151
>>> u = scipy.stats.t.cdf(z, df=df)
152152
>>> t = scipy.stats.norm.ppf(u)
153153
154-
:param ArrayLike cov:
154+
:param cov:
155155
covariance matrix, a.k.a. correlation matrix. It must be a
156156
Hermitian, positive-definite matrix in any square array-like format.
157157
The width of cov determines the number of dimensions of the output.
158158
159-
:param ArrayLike df:
159+
:param df:
160160
Number of degrees of freedom. Can be either a scalar int for
161161
Student T Copula, or a one-dimensional NumPy array or array-like with
162162
one point per dimension for IT Copula.

pyscenarios/stats.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ def tail_dependence(
1919
1D array-like or Dask array containing samples from a
2020
uniform (0, 1) distribution.
2121
:param y:
22-
other array to compare against
22+
other 1D array-like or Dask array to compare against
2323
:param q:
24-
quantile(s) (0 < q < 1).
24+
quantile(s) (`0 < q < 1`).
2525
Either a scalar or a ND array-like or Dask array.
2626
:returns:
27-
Array of the same shape and type as q, containing:
27+
Array of the same shape and type as `q`, containing:
2828
2929
.. math::
3030

0 commit comments

Comments
 (0)