Skip to content

Commit f36d3b4

Browse files
committed
NoParFileError, ParsingError: restrict attrs to Path
1 parent ca2e6b4 commit f36d3b4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/stagpy/error.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import typing
66

77
if typing.TYPE_CHECKING:
8-
from os import PathLike
8+
from pathlib import Path
99

1010
from .stagyydata import StagyyData
1111
from .step import Step
@@ -76,7 +76,7 @@ class NoParFileError(StagpyError):
7676
parfile (PathLike): the expected path of the par file.
7777
"""
7878

79-
def __init__(self, parfile: PathLike):
79+
def __init__(self, parfile: Path):
8080
self.parfile = parfile
8181
super().__init__(f"{parfile} file not found")
8282

@@ -93,7 +93,7 @@ class ParsingError(StagpyError):
9393
msg (str): error message.
9494
"""
9595

96-
def __init__(self, file: PathLike, msg: str):
96+
def __init__(self, file: Path, msg: str):
9797
self.file = file
9898
self.msg = msg
9999
super().__init__(file, msg)

0 commit comments

Comments
 (0)