Skip to content

Commit

Permalink
Docs: Document HTML action class (#1423)
Browse files Browse the repository at this point in the history
* refactor: improve docstring for HTML action class and its initializer

* refactor: enhance docstring for HTML action class and its initializer

* chore: add docs-pages-build to .gitignore

* refactor: Remove attributes from html action's docstring

* chore: Add a bit more context to html action docstring
  • Loading branch information
drikusroor authored Dec 16, 2024
1 parent f8ad7eb commit dc3ca49
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions backend/experiment/actions/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,19 @@
from .base_action import BaseAction


class HTML(BaseAction): # pylint: disable=too-few-public-methods
"""
A custom view that handles a custom HTML question
Relates to client component: HTML.js
class HTML(BaseAction):
"""An action that renders HTML content. See also the `HTML.tsx` component in the frontend project.
Args:
body (str): The HTML body content
Examples:
To render a simple HTML snippet with a title and a paragraph:
>>> html_action = HTML('<h1>Hello, world!</h1><p>This is a simple HTML snippet.</p>')
"""

ID = 'HTML'
ID = "HTML"

def __init__(self, body):
"""
- body: HTML body
"""
def __init__(self, body: str):
self.body = body

0 comments on commit dc3ca49

Please sign in to comment.