for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
from typing import Dict
from cleo.io.io import IO
from sdoc.sdoc2.node.Node import Node
from sdoc.sdoc2.NodeStore import NodeStore
class SmileNode(Node):
"""
SDoc2 node for development testing.
# ------------------------------------------------------------------------------------------------------------------
def __init__(self, io: IO, options: Dict[str, str], argument: str):
Object constructor.
:param OutputStyle io: The IO object.
:param dict[str,str] options: The options of this smile.
:param str argument: Not used.
super().__init__(io, 'smile', options, argument)
def get_command(self) -> str:
Returns the command of this node, i.e. smile.
return 'smile'
def is_block_command(self) -> bool:
Returns False.
return False
def is_inline_command(self) -> bool:
Returns True.
return True
def is_phrasing(self) -> bool:
# ----------------------------------------------------------------------------------------------------------------------
NodeStore.register_inline_command('smile', SmileNode)