insndb/core: introduce section path type
authorDmitry Selyutin <ghostmansd@gmail.com>
Thu, 22 Jun 2023 19:16:51 +0000 (22:16 +0300)
committerDmitry Selyutin <ghostmansd@gmail.com>
Fri, 23 Jun 2023 07:40:44 +0000 (10:40 +0300)
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