Fix deprecations and modernize testing
- use pytest and tox for testing - fix deprecation warnings from Sphinx and Docutils
This commit is contained in:
parent
3daf568fb6
commit
0af66c6964
10 changed files with 503 additions and 222 deletions
|
@ -82,7 +82,7 @@ class IPXRefRole(XRefRole):
|
|||
indexnode = addnodes.index()
|
||||
targetid = 'index-%s' % env.new_serialno('index')
|
||||
targetnode = nodes.target('', '', ids=[targetid])
|
||||
doctitle = document.traverse(nodes.title)[0].astext()
|
||||
doctitle = list(document.traverse(nodes.title))[0].astext()
|
||||
idxtext = "%s; %s" % (node.astext(), doctitle)
|
||||
idxtext2 = "%s; %s" % (self.index_type, node.astext())
|
||||
indexnode['entries'] = [
|
||||
|
@ -125,7 +125,7 @@ class IPRange(Directive):
|
|||
if self.env.docname in self.env.titles:
|
||||
doctitle = self.env.titles[self.env.docname]
|
||||
else:
|
||||
doctitle = self.state.document.traverse(nodes.title)[0].astext()
|
||||
doctitle = list(self.state.document.traverse(nodes.title))[0].astext()
|
||||
idx_text = "%s; %s" % (self.rangespec, doctitle)
|
||||
self.indexnode = addnodes.index(entries=[
|
||||
('single', idx_text, name, '', None),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue