From b6634ddede16e33aab769c0f66521da21badea06 Mon Sep 17 00:00:00 2001 From: Greenscreener Date: Wed, 20 Sep 2023 18:46:25 +0200 Subject: [PATCH] Deprecate transform.py. --- src/formatitko/transform.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/formatitko/transform.py b/src/formatitko/transform.py index 92c820e..69679d9 100644 --- a/src/formatitko/transform.py +++ b/src/formatitko/transform.py @@ -10,10 +10,15 @@ from .command import Command, BlockCommand, InlineCommand from .command_util import handle_command_define, parse_command from .elements import FQuoted + +import warnings +warnings.warn("The transform function has been deprecated, is left only for reference and will be removed in future commits. TransformProcessor should be used in its place.", DeprecationWarning) + # This is where tha magic happens. This function transforms a single element, # to transform the entire tree, panflute's walk should be used. def transform(e: Element, c: Context) -> Element: + warnings.warn("The transform function has been deprecated, is left only for reference and will be removed in future commits. TransformProcessor should be used in its place.", DeprecationWarning) # Determine if this space should be non-breakable. See whitespace.py. if isinstance(e, Whitespace) and bavlna(e, c): e = NBSP()