Skip to content

Commit 380ff1c

Browse files
authored
Fix Sphinx rst warnings (#163)
1 parent ba83985 commit 380ff1c

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

flow/record/adapter/text.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626

2727

2828
class DefaultMissing(dict):
29+
"""A dictionary subclass that returns a formatted string for missing keys.
30+
31+
Example:
32+
>>> d = DefaultMissing({"foo": "bar"})
33+
>>> d['foo']
34+
'bar'
35+
>>> d['missing_key']
36+
'{missing_key}'
37+
"""
38+
2939
def __missing__(self, key: str) -> str:
3040
return key.join("{}")
3141

tests/docs/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# You can set these variables from the command line, and also
55
# from the environment for the first two.
6-
SPHINXOPTS ?= -jauto
6+
SPHINXOPTS ?= -jauto -w $(BUILDDIR)/warnings.log --fail-on-warning
77
SPHINXBUILD ?= sphinx-build
88
SOURCEDIR = .
99
BUILDDIR = build

tests/docs/conf.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,8 @@
3232
autodoc_member_order = "groupwise"
3333

3434
autosectionlabel_prefix_document = True
35+
36+
suppress_warnings = [
37+
# https://github.com/readthedocs/sphinx-autoapi/issues/285
38+
"autoapi.python_import_resolution",
39+
]

0 commit comments

Comments
 (0)