From 0364578c804080d24f4e8b656c58c83f9d0abb51 Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Thu, 29 Jun 2023 01:11:55 +0300 Subject: [PATCH] visitor: simplify default hook --- src/mdis/visitor.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/mdis/visitor.py b/src/mdis/visitor.py index bb87fd6..b9c2056 100644 --- a/src/mdis/visitor.py +++ b/src/mdis/visitor.py @@ -15,12 +15,12 @@ class VisitorMeta(dispatcher.DispatcherMeta): class Visitor(dispatcher.Dispatcher, metaclass=VisitorMeta): @dispatcher.Hook(object) - def dispatch_object(self, node, *arguments): + def dispatch_object(self, node): return node class ContextVisitor(Visitor): @dispatcher.Hook(object) @contextlib.contextmanager - def dispatch_object(self, node, *arguments): + def dispatch_object(self, node): yield node -- 2.30.2