Skip to content

Fix: Do not parse empty string as valid value in _convert_bsblan_value#1390

Merged
liudger merged 2 commits intomainfrom
fix-do-not-parse-when-empty
Mar 6, 2026
Merged

Fix: Do not parse empty string as valid value in _convert_bsblan_value#1390
liudger merged 2 commits intomainfrom
fix-do-not-parse-when-empty

Conversation

@liudger
Copy link
Owner

@liudger liudger commented Mar 6, 2026

This pull request makes a minor improvement to the _convert_bsblan_value function in src/bsblan/models.py. The function now treats both "---" and an empty string as inactive values, returning None in these cases.

  • The check for inactive values in _convert_bsblan_value was expanded to include empty strings ("") in addition to "---", ensuring more robust handling of missing or inactive input values.

Copilot AI review requested due to automatic review settings March 6, 2026 13:15
@liudger liudger added the bugfix Inconsistencies or issues which will cause a problem for users or implementers. label Mar 6, 2026
@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.89%. Comparing base (3b879e1) to head (15f607b).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1390   +/-   ##
=======================================
  Coverage   99.89%   99.89%           
=======================================
  Files           6        6           
  Lines         997      997           
  Branches      139      139           
=======================================
  Hits          996      996           
  Partials        1        1           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Improves robustness of value conversion in the BSB-LAN data model layer by treating empty-string parameter values as inactive (similar to "---"), returning None from _convert_bsblan_value.

Changes:

  • Expand inactive-value detection in _convert_bsblan_value to include "" in addition to "---".

You can also share your feedback on Copilot code review. Take the survey.

@sonarqubecloud
Copy link

sonarqubecloud bot commented Mar 6, 2026

@liudger liudger merged commit 22adc55 into main Mar 6, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix Inconsistencies or issues which will cause a problem for users or implementers.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants