Commit 1689c18
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.1 file changed
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
339 | | - | |
340 | 339 | | |
341 | 340 | | |
342 | 341 | | |
| |||
0 commit comments