From 43b7e27a22af12be7e9de61e7ec3d90f62f2b442 Mon Sep 17 00:00:00 2001 From: "Salvador E. Tropea" Date: Fri, 26 Jun 2020 12:02:18 -0300 Subject: [PATCH] Documented the output_class macro --- kiplot/macros.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kiplot/macros.py b/kiplot/macros.py index 75d7d618..8f1689ba 100644 --- a/kiplot/macros.py +++ b/kiplot/macros.py @@ -59,6 +59,13 @@ def document(sentences, to_source, **kw): def output_class(tree, **kw): + """A decorator to wraps a class with: + + from .out_base import BaseOutput + ... Class definition + BaseOutput.register(CLASS_NAME_LOWER_STRING, CLASS_NAME) + + Allowing to register the class as an output. """ if isinstance(tree, ClassDef): # Create the register call name = tree.name