insndb/core: introduce Path type
authorDmitry Selyutin <ghostmansd@gmail.com>
Fri, 9 Jun 2023 15:17:33 +0000 (18:17 +0300)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 22 Dec 2023 19:26:19 +0000 (19:26 +0000)
src/openpower/insndb/core.py

index 7c3c0399c0322408707ce0a4c055dfbfe5ffe493..c957eb3651ae0452048eb64701359be4ff04780f 100644 (file)
@@ -65,6 +65,10 @@ class String(Node, str):
     pass
 
 
+class Path(Node, type(_pathlib.Path())):
+    pass
+
+
 @_dataclasses.dataclass(eq=True, frozen=True)
 class Dataclass:
     def subnodes(self, match=None):
@@ -609,7 +613,7 @@ class Section:
         def __repr__(self):
             return (bin(self) if self else "None")
 
-    path: _pathlib.Path
+    path: Path
     bitsel: BitSel
     suffix: Suffix
     mode: Mode