Skip to content

Commit 796b3ed

Browse files
committed
Updated the two flagged random.uniform(...) lines to suppress both Ruff and Bandit at the exact call sites.
1 parent b0bccc9 commit 796b3ed

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

metrics/interfaces/management/commands/seed_random.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,10 +219,12 @@ def _seed_time_series_rows(
219219
for geography in geographies:
220220
for day_offset in range(days):
221221
current_date = start_date + timedelta(days=day_offset)
222-
base_value = random.uniform(5.0, 250.0) # nosec B311
222+
base_value = random.uniform(5.0, 250.0) # noqa: S311 # nosec B311
223223
metric_value = round(
224-
base_value + random.uniform(-10.0, 10.0), 2
225-
) # nosec B311
224+
base_value
225+
+ random.uniform(-10.0, 10.0), # noqa: S311 # nosec B311
226+
2,
227+
)
226228
epidemiological_week = current_date.isocalendar().week
227229

228230
core_rows.append(

0 commit comments

Comments
 (0)