Skip to content

Commit 5483449

Browse files
committed
Fix F821: Add missing scenario_name definition
- scenario_name was used at line 494 but never defined - Added: scenario_name = args.test.stem (line 472) - This fixes the PEP8 F821 error in PR 375 - Matches master branch implementation
1 parent aaa366d commit 5483449

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

roles/telemetry_chargeback/files/gen_synth_loki_data.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def generate_loki_data(
140140
logger.debug(f"Time range in epoch seconds: {start_epoch} to {end_epoch}")
141141

142142
log_data_list = [] # This list will hold all our data points
143-
last_end_of_step_epoch = None # Track last entry's end epoch
143+
# last_end_of_step_epoch = None # Track last entry's end epoch
144144

145145
# Loop through the time range and generate data points
146146
for current_epoch in range(
@@ -468,6 +468,10 @@ def main():
468468
logger.critical(f"Failed to load config: {e}")
469469
return
470470

471+
# Derive scenario name from test file path
472+
scenario_name = args.test.stem
473+
logger.info(f"Derived scenario name from test file: {scenario_name}")
474+
471475
# Get generation parameters from config
472476
generation_config = config.get("generation", {})
473477
days = generation_config.get("days", 30)

0 commit comments

Comments
 (0)