Skip to content

Commit 1689c18

Browse files
authored
Remove dead code accessing unused simulation_id in measurement callback (#194)
Addresses review feedback on PR #193 regarding unused code in the `__onmeasurement` callback method. ## Changes - Removed `message["simulation_id"]` access in `Simulation.__onmeasurement()` that extracted but never used the value - The simulation ID is already stored as `self.simulation_id` when the simulation starts, making this extraction redundant ```python def __onmeasurement(self, headers, message): """Call the measurement callbacks""" - message["simulation_id"] # Dead code timestamp = message["message"]["timestamp"] measurements = message["message"]["measurements"] for p in self.__filterable_measurement_callback_set: p[0](self, timestamp, measurements) ``` <!-- START COPILOT CODING AGENT TIPS --> --- ✨ Let Copilot coding agent [set things up for you](https://github.com/GRIDAPPSD/gridappsd-python/issues/new?title=✨+Set+up+Copilot+instructions&body=Configure%20instructions%20for%20this%20repository%20as%20documented%20in%20%5BBest%20practices%20for%20Copilot%20coding%20agent%20in%20your%20repository%5D%28https://gh.io/copilot-coding-agent-tips%29%2E%0A%0A%3COnboard%20this%20repo%3E&assignees=copilot) — coding agent works faster and does higher quality work when set up for your repo.
2 parents b22dd49 + b0eef3e commit 1689c18

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

gridappsd-python-lib/gridappsd/simulation.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ def __onmeasurement(self, headers, message):
336336
:param message:
337337
:return:
338338
"""
339-
message["simulation_id"]
340339
timestamp = message["message"]["timestamp"]
341340
measurements = message["message"]["measurements"]
342341
for p in self.__filterable_measurement_callback_set:

0 commit comments

Comments
 (0)