diff --git a/pyaerocom/io/pyaro/pyaro_config.py b/pyaerocom/io/pyaro/pyaro_config.py index 4891cff8e..a05d4f747 100644 --- a/pyaerocom/io/pyaro/pyaro_config.py +++ b/pyaerocom/io/pyaro/pyaro_config.py @@ -3,7 +3,7 @@ import logging from importlib import resources from pathlib import Path -from typing import ClassVar +from typing import ClassVar, Any import yaml from pydantic import BaseModel, ConfigDict @@ -15,6 +15,8 @@ # TODO Check a validator if extra/kwarg is serializable. Either in json_repr or as a @field_validator on extra +FilterArgs = dict[str, Any] + class PyaroConfig(BaseModel): model_config = ConfigDict(arbitrary_types_allowed=True, extra="allow") @@ -30,7 +32,7 @@ class PyaroConfig(BaseModel): name: str data_id: str filename_or_obj_or_url: str | list[str] | Path | list[Path] - filters: dict[str, dict[str, list[str]] | dict[str, list[tuple]]] + filters: dict[str, FilterArgs] name_map: dict[str, str] | None = None # no Unit conversion option ##########################