From 84f9c40cff102be5de4a4063931764d74d7abbae Mon Sep 17 00:00:00 2001 From: Dmitry Selyutin Date: Mon, 4 Dec 2023 20:55:20 +0300 Subject: [PATCH] walker: drop path categories --- src/mdis/walker.py | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/src/mdis/walker.py b/src/mdis/walker.py index 6d316ac..4ed17a3 100644 --- a/src/mdis/walker.py +++ b/src/mdis/walker.py @@ -13,37 +13,6 @@ class WalkerMeta(dispatcher.DispatcherMeta): pass -class GenericPath: - def __init__(self, path): - self.__path = path - return super().__init__() - - def __str__(self): - return self.__path.__str__() - - def __repr__(self): - return f"{self.__class__.__name__}({str(self)})" - - @property - def path(self): - return self.__path - - -class IndexPath(GenericPath): - def __str__(self): - return f"[{self.path!r}]" - - -class AttributePath(GenericPath): - def __str__(self): - return f".{self.path}" - - -class HashPath(GenericPath): - def __str__(self): - return f"{{{self.path}}}" - - class Walker(dispatcher.Dispatcher, metaclass=WalkerMeta): @dispatcher.Hook(tuple, list) def dispatch_ordered_sequence(self, node): -- 2.30.2