Skip to content

Commit

Permalink
style(bc): use t alias to import typing
Browse files Browse the repository at this point in the history
  • Loading branch information
laurent-laporte-pro committed Mar 14, 2024
1 parent 98fd6e8 commit 7c9ff99
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from typing import Dict, List, Literal, Mapping, Optional, Sequence, Union
import typing as t

from antarest.core.model import JSON
from antarest.matrixstore.model import MatrixData
Expand All @@ -17,18 +17,18 @@ def apply_binding_constraint(
new_key: str,
bd_id: str,
name: str,
comments: Optional[str],
comments: t.Optional[str],
enabled: bool,
freq: BindingConstraintFrequency,
operator: BindingConstraintOperator,
coeffs: Dict[str, List[float]],
values: Optional[Union[List[List[MatrixData]], str]],
less_term_matrix: Optional[Union[List[List[MatrixData]], str]],
greater_term_matrix: Optional[Union[List[List[MatrixData]], str]],
equal_term_matrix: Optional[Union[List[List[MatrixData]], str]],
filter_year_by_year: Optional[str] = None,
filter_synthesis: Optional[str] = None,
group: Optional[str] = None,
coeffs: t.Dict[str, t.List[float]],
values: t.Union[t.List[t.List[MatrixData]], str, None],
less_term_matrix: t.Union[t.List[t.List[MatrixData]], str, None],
greater_term_matrix: t.Union[t.List[t.List[MatrixData]], str, None],
equal_term_matrix: t.Union[t.List[t.List[MatrixData]], str, None],
filter_year_by_year: t.Optional[str] = None,
filter_synthesis: t.Optional[str] = None,
group: t.Optional[str] = None,
) -> CommandOutput:
version = study_data.config.version
binding_constraints[new_key] = {
Expand Down Expand Up @@ -101,7 +101,7 @@ def apply_binding_constraint(
def parse_bindings_coeffs_and_save_into_config(
bd_id: str,
study_data_config: FileStudyTreeConfig,
coeffs: Mapping[str, Union[Literal["hourly", "daily", "weekly"], Sequence[float]]],
coeffs: t.Mapping[str, t.Union[t.Literal["hourly", "daily", "weekly"], t.Sequence[float]]],
) -> None:
if bd_id not in [bind.id for bind in study_data_config.bindings]:
areas_set = set()
Expand Down

0 comments on commit 7c9ff99

Please sign in to comment.