Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
killian-scalian committed Dec 10, 2024
1 parent 3561c74 commit ca0300c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/antares/service/api_services/link_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
from types import MappingProxyType
from typing import Optional

import pandas as pd

from antares.api_conf.api_conf import APIconf
from antares.api_conf.request_wrapper import RequestWrapper
from antares.exceptions.exceptions import (
Expand All @@ -25,7 +27,6 @@
from antares.model.area import Area
from antares.model.link import Link, LinkProperties, LinkUi
from antares.service.base_services import BaseLinkService
import pandas as pd


class LinkApiService(BaseLinkService):
Expand Down
3 changes: 1 addition & 2 deletions src/antares/service/local_services/link_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
from typing import Any, Dict, Optional

import pandas as pd
from antares.tools.ini_tool import IniFile, IniFileTypes

from antares.config.local_configuration import LocalConfiguration
from antares.exceptions.exceptions import LinkCreationError
Expand All @@ -26,6 +25,7 @@
from antares.service.base_services import BaseLinkService
from antares.tools.contents_tool import sort_ini_sections
from antares.tools.custom_raw_config_parser import CustomRawConfigParser
from antares.tools.ini_tool import IniFile, IniFileTypes
from antares.tools.matrix_tool import read_timeseries
from antares.tools.time_series_tool import TimeSeriesFileType

Expand Down Expand Up @@ -182,7 +182,6 @@ def read_links(self) -> list[Link]:
# If the properties.ini doesn't exist, we stop the reading process
if links_dict:
for area_to in links_dict:

# Extract and delete from original dictionnary, the ui related properties
ui_fields = ["link-style", "link-width", "colorr", "colorg", "colorb"]
properties_field = {
Expand Down
6 changes: 3 additions & 3 deletions tests/antares/services/local_services/test_area.py
Original file line number Diff line number Diff line change
Expand Up @@ -1422,9 +1422,9 @@ def test_read_links_local(self, local_study_w_links):
assert link.ui.colorb == 112
assert link.ui.colorg == 112
assert link.ui.colorr == 112
assert link.properties.hurdles_cost == False
assert link.properties.loop_flow == False
assert link.properties.use_phase_shifter == False
assert not link.properties.hurdles_cost
assert not link.properties.loop_flow
assert not link.properties.use_phase_shifter
assert link.properties.transmission_capacities.value == "enabled"
assert link.properties.asset_type.value == "ac"
assert isinstance(link.properties.filter_year_by_year, set)
Expand Down

0 comments on commit ca0300c

Please sign in to comment.