summaryrefslogtreecommitdiffstats
path: root/doc/development/tutorials/examples/helloworld.py
diff options
context:
space:
mode:
Diffstat (limited to 'doc/development/tutorials/examples/helloworld.py')
-rw-r--r--doc/development/tutorials/examples/helloworld.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/doc/development/tutorials/examples/helloworld.py b/doc/development/tutorials/examples/helloworld.py
index d6d81fd..da29562 100644
--- a/doc/development/tutorials/examples/helloworld.py
+++ b/doc/development/tutorials/examples/helloworld.py
@@ -1,16 +1,18 @@
from docutils import nodes
from docutils.parsers.rst import Directive
+from sphinx.application import Sphinx
+from sphinx.util.typing import ExtensionMetadata
-class HelloWorld(Directive):
+class HelloWorld(Directive):
def run(self):
paragraph_node = nodes.paragraph(text='Hello World!')
return [paragraph_node]
-def setup(app):
- app.add_directive("helloworld", HelloWorld)
+def setup(app: Sphinx) -> ExtensionMetadata:
+ app.add_directive('helloworld', HelloWorld)
return {
'version': '0.1',