Skip to content

refactor: replace try/except KeyError with safe dict.get() for zone c…#141

Merged
KJonline merged 1 commit into
devfrom
fix-xone-id-issue
May 20, 2026
Merged

refactor: replace try/except KeyError with safe dict.get() for zone c…#141
KJonline merged 1 commit into
devfrom
fix-xone-id-issue

Conversation

@KJonline

Copy link
Copy Markdown
Contributor

…omparison

  • Use .get("props", {}).get("zone") instead of direct key access in get_device_data
  • Remove KeyError exception handler and warning log for missing zone data
  • Only compare zones when both product_zone and device_zone exist
  • Add test verifying TRV devices without zone props are silently skipped

…omparison

- Use .get("props", {}).get("zone") instead of direct key access in get_device_data
- Remove KeyError exception handler and warning log for missing zone data
- Only compare zones when both product_zone and device_zone exist
- Add test verifying TRV devices without zone props are silently skipped
@codecov

codecov Bot commented May 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.96%. Comparing base (bce43e8) to head (153dad2).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##              dev     #141      +/-   ##
==========================================
- Coverage   99.96%   99.96%   -0.01%     
==========================================
  Files          30       30              
  Lines        2595     2594       -1     
  Branches      293      293              
==========================================
- Hits         2594     2593       -1     
  Partials        1        1              
Flag Coverage Δ
unittests 99.96% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/helper/hive_helper.py 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@KJonline KJonline merged commit 3838609 into dev May 20, 2026
10 checks passed
@KJonline KJonline deleted the fix-xone-id-issue branch May 20, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant