Skip to content

Commit

Permalink
Sphinx 4.1 fixes (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep authored Jul 13, 2021
1 parent 79eb7dd commit 1f6a921
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion scanpydoc/definition_list_typed_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,12 @@ def make_field(
domain: str,
items: Tuple[str, List[nodes.inline]],
env: BuildEnvironment = None,
**kw,
) -> nodes.field:
"""Render a field to a document-tree node representing a definition list item."""

def make_refs(role_name, name, node):
return self.make_xrefs(role_name, domain, name, node, env=env)
return self.make_xrefs(role_name, domain, name, node, env=env, **kw)

def handle_item(
fieldarg: str, content: List[nodes.inline]
Expand Down
4 changes: 2 additions & 2 deletions tests/test_elegant_typehints.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,8 @@ def test_autodoc(app, _testmod, direc, base, sub):
out = Path(app.outdir, "index.html").read_text()
assert not app._warning.getvalue(), app._warning.getvalue()
assert re.search(
r'<code[^>]*><span class="pre">test\.</span></code>'
f'<code[^>]*><span class="pre">{sub}</span></code>',
r'<(code|span)?[^>]*><span class="pre">test\.</span></(code|span)>'
f'<(code|span)?[^>]*><span class="pre">{sub}</span></(code|span)>',
out,
), out
assert f'<a class="headerlink" href="#test.{sub}"' in out, out
Expand Down

0 comments on commit 1f6a921

Please sign in to comment.