|
5 | 5 | from copy import deepcopy |
6 | 6 | from enum import Enum |
7 | 7 | from pathlib import Path |
8 | | -from typing import TYPE_CHECKING, Dict, List, Optional, Self, Tuple |
| 8 | +from typing import TYPE_CHECKING, Any, Dict, List, Optional, Self, Tuple |
9 | 9 |
|
10 | 10 | import cftime |
11 | 11 | import numpy as np |
@@ -186,7 +186,7 @@ def to_connected_cells_dataset( |
186 | 186 | idomain: GridDataArray, |
187 | 187 | grid: xu.Ugrid2d, |
188 | 188 | edge_index: np.ndarray, |
189 | | - edge_values: dict, |
| 189 | + edge_values: dict[str, Any], |
190 | 190 | ) -> xr.Dataset: |
191 | 191 | """ |
192 | 192 | Converts a cell edge grid with values defined on the edges to a dataset with the cell ids of the connected cells, |
@@ -416,7 +416,7 @@ def _prepare_barrier_dataset_for_mf6_adapter(dataset: xr.Dataset) -> xr.Dataset: |
416 | 416 |
|
417 | 417 | def _snap_to_grid_and_aggregate( |
418 | 418 | barrier_dataframe: GeoDataFrameType, grid2d: xu.Ugrid2d, vardict_agg: dict[str, str] |
419 | | -) -> tuple[xu.UgridDataset, npt.NDArray]: |
| 419 | +) -> tuple[xu.UgridDataset, npt.NDArray[Any]]: |
420 | 420 | """ |
421 | 421 | Snap barrier dataframe to grid and aggregate multiple lines with a list of |
422 | 422 | methods per variable. |
@@ -481,7 +481,7 @@ def __init__( |
481 | 481 | geometry: "gpd.GeoDataFrame", |
482 | 482 | print_input: bool = False, |
483 | 483 | ) -> None: |
484 | | - dict_dataset = {"print_input": print_input} |
| 484 | + dict_dataset: dict[str, Any] = {"print_input": print_input} |
485 | 485 | super().__init__(dict_dataset) |
486 | 486 | self.line_data = geometry |
487 | 487 |
|
@@ -859,7 +859,7 @@ def _get_variable_name(self) -> str: |
859 | 859 | raise NotImplementedError |
860 | 860 |
|
861 | 861 | @abc.abstractmethod |
862 | | - def _get_vertical_variables(self) -> list: |
| 862 | + def _get_vertical_variables(self) -> list[str]: |
863 | 863 | raise NotImplementedError |
864 | 864 |
|
865 | 865 | def clip_box( |
@@ -1143,7 +1143,7 @@ def _get_barrier_type(self): |
1143 | 1143 | def _get_variable_name(self) -> str: |
1144 | 1144 | return "hydraulic_characteristic" |
1145 | 1145 |
|
1146 | | - def _get_vertical_variables(self) -> list: |
| 1146 | + def _get_vertical_variables(self) -> list[str]: |
1147 | 1147 | return [] |
1148 | 1148 |
|
1149 | 1149 | def _compute_barrier_values( |
@@ -1220,7 +1220,7 @@ def _get_barrier_type(self): |
1220 | 1220 | def _get_variable_name(self) -> str: |
1221 | 1221 | return "hydraulic_characteristic" |
1222 | 1222 |
|
1223 | | - def _get_vertical_variables(self) -> list: |
| 1223 | + def _get_vertical_variables(self) -> list[str]: |
1224 | 1224 | return ["layer"] |
1225 | 1225 |
|
1226 | 1226 | def _compute_barrier_values( |
@@ -1294,7 +1294,7 @@ def _get_barrier_type(self): |
1294 | 1294 | def _get_variable_name(self) -> str: |
1295 | 1295 | return "multiplier" |
1296 | 1296 |
|
1297 | | - def _get_vertical_variables(self) -> list: |
| 1297 | + def _get_vertical_variables(self) -> list[str]: |
1298 | 1298 | return [] |
1299 | 1299 |
|
1300 | 1300 | def _compute_barrier_values( |
@@ -1373,7 +1373,7 @@ def _get_barrier_type(self): |
1373 | 1373 | def _get_variable_name(self) -> str: |
1374 | 1374 | return "multiplier" |
1375 | 1375 |
|
1376 | | - def _get_vertical_variables(self) -> list: |
| 1376 | + def _get_vertical_variables(self) -> list[str]: |
1377 | 1377 | return ["layer"] |
1378 | 1378 |
|
1379 | 1379 | def _compute_barrier_values( |
@@ -1467,7 +1467,7 @@ def _get_barrier_type(self): |
1467 | 1467 | def _get_variable_name(self) -> str: |
1468 | 1468 | return "resistance" |
1469 | 1469 |
|
1470 | | - def _get_vertical_variables(self) -> list: |
| 1470 | + def _get_vertical_variables(self) -> list[str]: |
1471 | 1471 | return [] |
1472 | 1472 |
|
1473 | 1473 | def _compute_barrier_values( |
@@ -1539,7 +1539,7 @@ def _get_barrier_type(self): |
1539 | 1539 | def _get_variable_name(self) -> str: |
1540 | 1540 | return "resistance" |
1541 | 1541 |
|
1542 | | - def _get_vertical_variables(self) -> list: |
| 1542 | + def _get_vertical_variables(self) -> list[str]: |
1543 | 1543 | return ["layer"] |
1544 | 1544 |
|
1545 | 1545 | def _compute_barrier_values( |
|
0 commit comments