Skip to content

Commit c4db137

Browse files
committed
Add string type hinting to paths
1 parent 1e075ee commit c4db137

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

harp/reader.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,8 @@ def __getattr__(self, __name: str) -> RegisterReader:
8181
@classmethod
8282
def from_file(
8383
cls,
84-
filepath: PathLike,
85-
base_path: Optional[PathLike] = None,
84+
filepath: PathLike | str,
85+
base_path: Optional[PathLike | str] = None,
8686
include_common_registers: bool = True,
8787
epoch: Optional[datetime] = None,
8888
keep_type: bool = False,
@@ -130,7 +130,7 @@ def from_file(
130130
def from_url(
131131
cls,
132132
url: str,
133-
base_path: Optional[PathLike] = None,
133+
base_path: Optional[PathLike | str] = None,
134134
include_common_registers: bool = True,
135135
epoch: Optional[datetime] = None,
136136
keep_type: bool = False,
@@ -177,7 +177,7 @@ def from_url(
177177
def from_str(
178178
cls,
179179
schema: str,
180-
base_path: Optional[PathLike] = None,
180+
base_path: Optional[PathLike | str] = None,
181181
include_common_registers: bool = True,
182182
epoch: Optional[datetime] = None,
183183
keep_type: bool = False,
@@ -224,7 +224,7 @@ def from_str(
224224
def from_model(
225225
cls,
226226
model: Model,
227-
base_path: Optional[PathLike] = None,
227+
base_path: Optional[PathLike | str] = None,
228228
epoch: Optional[datetime] = None,
229229
keep_type: bool = False,
230230
) -> "DeviceReader":
@@ -265,7 +265,7 @@ def from_model(
265265
@classmethod
266266
def from_dataset(
267267
cls,
268-
dataset: PathLike,
268+
dataset: PathLike | str,
269269
include_common_registers: bool = True,
270270
epoch: Optional[datetime] = None,
271271
keep_type: bool = False,

0 commit comments

Comments
 (0)