Skip to content

Commit

Permalink
Use Sequence as type hint
Browse files Browse the repository at this point in the history
avoid type error messages when assigning list[str]
  • Loading branch information
Weidav authored and gutzbenj committed Aug 4, 2024
1 parent b9fc336 commit 1ebd504
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions wetterdienst/provider/dwd/observation/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import datetime as dt
import logging
from itertools import repeat
from typing import TYPE_CHECKING

import polars as pl
import portion as P
Expand Down Expand Up @@ -52,6 +53,9 @@
from wetterdienst.util.enumeration import parse_enumeration_from_template
from wetterdienst.util.python import to_list

if TYPE_CHECKING:
from collections.abc import Sequence

log = logging.getLogger(__name__)


Expand Down Expand Up @@ -447,9 +451,9 @@ def __init__(
parameter: str
| DwdObservationDataset
| DwdObservationParameter
| list[str | DwdObservationDataset | DwdObservationParameter],
| Sequence[str | DwdObservationDataset | DwdObservationParameter],
resolution: str | Resolution | DwdObservationResolution,
period: str | Period | DwdObservationPeriod | list[str | Period | DwdObservationPeriod] = None,
period: str | Period | DwdObservationPeriod | Sequence[str | Period | DwdObservationPeriod] = None,
start_date: str | dt.datetime | None = None,
end_date: str | dt.datetime | None = None,
settings: Settings | None = None,
Expand Down

0 comments on commit 1ebd504

Please sign in to comment.