Skip to content

Commit 0812d5f

Browse files
authored
Merge pull request #145 from altendky/strict_sphinx
2 parents 150881d + 54fc7d5 commit 0812d5f

File tree

4 files changed

+21
-13
lines changed

4 files changed

+21
-13
lines changed

.readthedocs.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ formats:
88
build:
99
image: latest
1010

11+
sphinx:
12+
builder: html
13+
configuration: docs/conf.py
14+
fail_on_warning: true
15+
1116
python:
1217
version: 3.8
1318
install:

docs/conf.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
# -*- coding: utf-8 -*-
2-
from __future__ import unicode_literals
3-
42
import os
53

64

@@ -12,6 +10,18 @@ def read(*names, **kwargs):
1210
return fh.read()
1311

1412

13+
# Warn about all references to unknown targets
14+
nitpicky = True
15+
# Except for these ones, which we expect to point to unknown targets:
16+
nitpick_ignore = [
17+
# Perhaps this is "obvious" to those that know type hints. Perhaps we should
18+
# explain briefly with a link to the typing docs.
19+
("py:class", "desert.T"),
20+
# TODO: get around to adding .. py:module to attrs somewhere
21+
("py:mod", "attrs"),
22+
]
23+
24+
1525
extensions = [
1626
"sphinx.ext.autodoc",
1727
"sphinx.ext.napoleon",
@@ -72,8 +82,8 @@ def read(*names, **kwargs):
7282
intersphinx_mapping = {
7383
"python": ("https://docs.python.org/3", None),
7484
"marshmallow": ("https://marshmallow.readthedocs.io/en/latest/", None),
75-
"attrs": ("https://attrs.readthedocs.io/en/latest/", None),
76-
"attr": ("https://attrs.readthedocs.io/en/latest/", None),
85+
"attrs": ("https://www.attrs.org/en/latest/", None),
86+
"attr": ("https://www.attrs.org/en/latest/", None),
7787
"marshmallow_union": (
7888
"https://python-marshmallow-union.readthedocs.io/en/latest/",
7989
None,

docs/reference/modules.rst

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/usage.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Basics
1212
:end-before: end-basic-usage
1313

1414

15-
Desert can be used with :mod:`dataclasses` or :mod:`attr`. With either module,
15+
Desert can be used with :mod:`dataclasses` or :mod:`attrs`. With either module,
1616
Desert is able to infer the appropriate :mod:`marshmallow` field
1717
for any of these types:
1818

@@ -33,7 +33,7 @@ for any of these types:
3333
There are two syntaxes for
3434
specifying a field.
3535

36-
In the more concise form, :func:`desert.field()` wraps :mod:`dataclasses.field()` and
36+
In the more concise form, :func:`desert.field()` wraps :func:`dataclasses.field()` and
3737
:func:`desert.ib()` wraps :func:`attr.ib()`. These functions take a
3838
:class:`marshmallow.fields.Field` as the first argument, and the remaining arguments are
3939
forwarded to the corresponding wrapped function.

0 commit comments

Comments
 (0)