diff options
Diffstat (limited to 'sphinx/directives/code.py')
-rw-r--r-- | sphinx/directives/code.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sphinx/directives/code.py b/sphinx/directives/code.py index 73afac4ba..75ab61796 100644 --- a/sphinx/directives/code.py +++ b/sphinx/directives/code.py @@ -20,7 +20,6 @@ from sphinx.locale import __ from sphinx.util import logging from sphinx.util import parselinenos from sphinx.util.docutils import SphinxDirective -from sphinx.util.nodes import set_source_info if False: # For type annotation @@ -173,7 +172,7 @@ class CodeBlock(SphinxDirective): extra_args['hl_lines'] = hl_lines if 'lineno-start' in self.options: extra_args['linenostart'] = self.options['lineno-start'] - set_source_info(self, literal) + self.set_source_info(literal) caption = self.options.get('caption') if caption: @@ -446,7 +445,7 @@ class LiteralInclude(SphinxDirective): text, lines = reader.read(location=location) retnode = nodes.literal_block(text, text, source=filename) # type: nodes.Element - set_source_info(self, retnode) + self.set_source_info(retnode) if self.options.get('diff'): # if diff is set, set udiff retnode['language'] = 'udiff' elif 'language' in self.options: |