Skip to content

Commit

Permalink
set utils.Path as type hint
Browse files Browse the repository at this point in the history
  • Loading branch information
dcodrut committed Jan 20, 2025
1 parent 58de111 commit 98da858
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions torchgeo/datasets/dl4gam_alps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,8 @@

"""DL4GAMAlps Dataset."""

import os
import pathlib
from collections.abc import Callable, Sequence
from pathlib import Path
from typing import ClassVar

import matplotlib.pyplot as plt
Expand All @@ -18,6 +17,7 @@
from .errors import DatasetNotFoundError
from .geo import NonGeoDataset
from .utils import (
Path,
download_and_extract_archive,
download_url,
extract_archive,
Expand Down Expand Up @@ -144,7 +144,7 @@ class DL4GAMAlps(NonGeoDataset):

def __init__(
self,
root: str | os.PathLike[str] = 'data',
root: Path = 'data',
split: str = 'train',
cv_iter: int = 1,
version: str = 'small',
Expand Down Expand Up @@ -177,7 +177,7 @@ def __init__(
"""
lazy_import('xarray')

self.root = Path(root)
self.root = pathlib.Path(root)
self.split = split
self.cv_iter = cv_iter
self.version = version
Expand Down

0 comments on commit 98da858

Please sign in to comment.