diff --git a/README.md b/README.md index 49b73e2..c257eeb 100644 --- a/README.md +++ b/README.md @@ -44,10 +44,6 @@ Basic Example: .. autoflex:: somepackage.MyClass # CURRENTLY NOT WORKING ``` - - - - ## Links - Source: diff --git a/autoflex/directives.py b/autoflex/directives.py index 3ba2793..74c7172 100644 --- a/autoflex/directives.py +++ b/autoflex/directives.py @@ -3,7 +3,7 @@ from typing import Any -class AutoFlexDirective(pydantic.BaseModel, rst.Directive): +class AutoFlexDirective(rst.Directive): """ Extension of the ``.. automodule::`` directive. @@ -17,20 +17,23 @@ class AutoFlexDirective(pydantic.BaseModel, rst.Directive): """ # Directive information - name: str = "autoflex" - arguments: Any = None - options: Any = None - content: Any = None - lineno: Any = None - content_offset: Any = None - block_text: Any = None - state: Any = None - state_machine: Any = None - reporter: Any = None - - required_arguments: int = 0 - optional_arguments: int = 0 + has_content: bool = True + + # name: str = "autoflex" + # arguments: Any = None + # options: Any = None + # content: Any = None + # lineno: Any = None + # content_offset: Any = None + # block_text: Any = None + # state: Any = None + # state_machine: Any = None + # reporter: Any = None + # + # required_arguments: int = 1 + # optional_arguments: int = 0 def run(self): print("AutoFlex directive running.") print(self.name) + return [] diff --git a/docs/examples/demo.rst b/docs/examples/demo.rst index e00e743..8d81f8e 100644 --- a/docs/examples/demo.rst +++ b/docs/examples/demo.rst @@ -1,5 +1,3 @@ Example .. autoflex:: - - Hi diff --git a/docs/examples/index.rst b/docs/examples/index.rst index 2f17cd7..a90c137 100644 --- a/docs/examples/index.rst +++ b/docs/examples/index.rst @@ -3,5 +3,6 @@ poetry run python -m sphinx docs/ _docs/ - .. include:: demo.rst + +.. autoflex::