Skip to content

Commit 997ddf9

Browse files
author
Andrei Neagu
committed
pylint
1 parent 7a40c71 commit 997ddf9

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/core/application.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,12 +134,14 @@ def create_base_app() -> FastAPI:
134134

135135
# minimal
136136
app = FastAPI(
137-
debug=settings.SC_BOOT_MODE.is_devel_mode(),
137+
debug=settings.SC_BOOT_MODE.is_devel_mode(), # pylint: disable=no-member
138138
title=PROJECT_NAME,
139139
description=SUMMARY,
140140
version=API_VERSION,
141141
openapi_url=f"/api/{API_VTAG}/openapi.json",
142-
**get_common_oas_options(settings.SC_BOOT_MODE.is_devel_mode()),
142+
**get_common_oas_options(
143+
settings.SC_BOOT_MODE.is_devel_mode() # pylint: disable=no-member
144+
),
143145
)
144146
override_fastapi_openapi_method(app)
145147
app.state.settings = settings

services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/core/settings.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,9 @@ class ApplicationSettings(BaseCustomSettings, MixinLoggingSettings):
193193

194194
@property
195195
def are_prometheus_metrics_enabled(self) -> bool:
196-
return self.DY_SIDECAR_CALLBACKS_MAPPING.metrics is not None
196+
return ( # pylint: disable=no-member
197+
self.DY_SIDECAR_CALLBACKS_MAPPING.metrics is not None
198+
)
197199

198200
@field_validator("DY_SIDECAR_RUN_ID", mode="before")
199201
@classmethod

services/dynamic-sidecar/src/simcore_service_dynamic_sidecar/models/shared_store.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ async def _setup_initial_volume_states(self) -> None:
8585
(VolumeCategory.OUTPUTS, VolumeStatus.CONTENT_NEEDS_TO_BE_SAVED),
8686
(VolumeCategory.STATES, VolumeStatus.CONTENT_NEEDS_TO_BE_SAVED),
8787
]:
88+
# pylint: disable=unsupported-assignment-operation
8889
self.volume_states[category] = VolumeState(status=status)
8990

9091
@classmethod

services/dynamic-sidecar/tests/unit/test_core_settings.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def test_settings_with_node_ports_storage_auth(
6161

6262
settings = ApplicationSettings.create_from_envs()
6363
assert settings.NODE_PORTS_STORAGE_AUTH
64+
# pylint:disable=no-member
6465
assert settings.NODE_PORTS_STORAGE_AUTH.STORAGE_SECURE is True
6566
assert settings.NODE_PORTS_STORAGE_AUTH.STORAGE_HOST == "host"
6667
assert settings.NODE_PORTS_STORAGE_AUTH.STORAGE_PORT == 42
@@ -75,19 +76,15 @@ def test_settings_with_node_ports_storage_auth(
7576
assert "passwd" not in settings.NODE_PORTS_STORAGE_AUTH.json()
7677

7778

78-
@pytest.mark.parametrize(
79-
"envs",
80-
[
81-
{},
82-
],
83-
)
79+
@pytest.mark.parametrize("envs", [{}])
8480
def test_settings_with_node_ports_storage_auth_as_missing(
8581
mock_environment: EnvVarsDict, monkeypatch: pytest.MonkeyPatch, envs: dict[str, str]
8682
):
8783
setenvs_from_dict(monkeypatch, envs)
8884

8985
settings = ApplicationSettings.create_from_envs()
9086
assert settings.NODE_PORTS_STORAGE_AUTH is not None
87+
# pylint:disable=no-member
9188
assert settings.NODE_PORTS_STORAGE_AUTH.auth_required is False
9289
assert settings.NODE_PORTS_STORAGE_AUTH.STORAGE_USERNAME is None
9390
assert settings.NODE_PORTS_STORAGE_AUTH.STORAGE_PASSWORD is None

0 commit comments

Comments
 (0)