insndb/core: introduce section path type
authorDmitry Selyutin <ghostmansd@gmail.com>
Thu, 22 Jun 2023 19:16:51 +0000 (22:16 +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 e5b1b12ef01c4a94b628fb58a686c08ee69abc25..7490cf670e320a0dbe2bea4286874762831bd09a 100644 (file)
@@ -548,6 +548,9 @@ class BitSel:
 
 
 class Section(Dataclass):
+    class Path(type(_pathlib.Path("."))):
+        pass
+
     class Mode(_enum.Enum):
         INTEGER = _enum.auto()
         PATTERN = _enum.auto()
@@ -576,7 +579,7 @@ class Section(Dataclass):
         def __repr__(self):
             return (bin(self) if self else "None")
 
-    csv: _pathlib.Path
+    csv: Path
     bitsel: BitSel
     suffix: Suffix
     mode: Mode