Skip to content

Commit

Permalink
Merge pull request #1450 from hanzhinstas/master
Browse files Browse the repository at this point in the history
doc: support sphinx versions 7.3.0 and above
  • Loading branch information
borisbat authored Dec 24, 2024
2 parents 16e1645 + 66904da commit a98717b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions doc/source/daslang.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@
from docutils import nodes
from docutils.parsers.rst import directives

from sphinx import version_info

from sphinx import addnodes
from sphinx.directives import ObjectDescription
from sphinx.domains import Domain, ObjType
from sphinx.domains.python import _pseudo_parse_arglist
if version_info >= (7, 3, 0):
from sphinx.domains.python._annotations import _pseudo_parse_arglist
else:
from sphinx.domains.python import _pseudo_parse_arglist
from sphinx.locale import _
from sphinx.roles import XRefRole
from sphinx.util.docfields import Field, GroupedField, TypedField
Expand Down Expand Up @@ -114,9 +119,8 @@ def add_target_and_index(self, name_obj, sig, signode):
objects = self.env.domaindata['das']['objects']
if fullname in objects:
self.state_machine.reporter.warning(
'duplicate object description of %s, ' % fullname +
'other instance in ' +
self.env.doc2path(objects[fullname][0]),
f'duplicate object description of {fullname}, ' +
f'other instance in {self.env.doc2path(objects[fullname][0])}',
line=self.lineno)
objects[fullname] = self.env.docname, self.objtype

Expand Down

0 comments on commit a98717b

Please sign in to comment.