From ca0300cddab81de2a2fee3908ef401fc06caf1e7 Mon Sep 17 00:00:00 2001 From: killian-scalian Date: Tue, 10 Dec 2024 17:56:36 +0100 Subject: [PATCH] lint --- src/antares/service/api_services/link_api.py | 3 ++- src/antares/service/local_services/link_local.py | 3 +-- tests/antares/services/local_services/test_area.py | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/antares/service/api_services/link_api.py b/src/antares/service/api_services/link_api.py index efb1010..ccc6446 100644 --- a/src/antares/service/api_services/link_api.py +++ b/src/antares/service/api_services/link_api.py @@ -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 ( @@ -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): diff --git a/src/antares/service/local_services/link_local.py b/src/antares/service/local_services/link_local.py index 1014621..4c40f12 100644 --- a/src/antares/service/local_services/link_local.py +++ b/src/antares/service/local_services/link_local.py @@ -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 @@ -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 @@ -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 = { diff --git a/tests/antares/services/local_services/test_area.py b/tests/antares/services/local_services/test_area.py index 9c470c3..00b7a8e 100644 --- a/tests/antares/services/local_services/test_area.py +++ b/tests/antares/services/local_services/test_area.py @@ -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)