Skip to content

Commit 92ff9cb

Browse files
committed
Switched to _is_relative_to to support Python 3.8
1 parent a7c18f4 commit 92ff9cb

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/rushd/flow.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
from scipy.optimize import curve_fit
2020

2121
from . import well_mapper
22+
from .io import _is_relative_to
2223

2324
OptionalZipPath = Union[str, Path, Tuple[Union[str, Path], str]]
2425

@@ -268,7 +269,7 @@ def load_csv_with_metadata(
268269
with ZipFile(zip_path) as data_zip:
269270
for file in data_zip.infolist():
270271
filename = Path(file.filename)
271-
if filename.is_relative_to(rel_to):
272+
if _is_relative_to(filename, rel_to):
272273
match = regex.match(filename.name)
273274
if match is None:
274275
continue
@@ -465,7 +466,7 @@ def load_csv(
465466
with ZipFile(zip_path) as data_zip:
466467
for file in data_zip.infolist():
467468
filename = Path(file.filename)
468-
if filename.is_relative_to(rel_to):
469+
if _is_relative_to(filename, rel_to):
469470
match = regex.match(filename.name)
470471
if match is None:
471472
continue

0 commit comments

Comments
 (0)