Skip to content

Conversation

@liudger
Copy link
Owner

@liudger liudger commented Feb 11, 2026

This pull request makes a small code simplification in the print_device_info function. The change replaces the verbose conditional assignment with the more concise or operator for defaulting to "N/A" when device.name or device.version are not set.

Copilot AI review requested due to automatic review settings February 11, 2026 09:35
@liudger liudger added the bugfix Inconsistencies or issues which will cause a problem for users or implementers. label Feb 11, 2026
@codecov
Copy link

codecov bot commented Feb 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.88%. Comparing base (adc9ae4) to head (8369126).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1345   +/-   ##
=======================================
  Coverage   99.88%   99.88%           
=======================================
  Files           6        6           
  Lines         892      892           
  Branches      124      124           
=======================================
  Hits          891      891           
  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.

@sonarqubecloud
Copy link

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

This PR simplifies how print_device_info in the example script defaults missing/empty device attributes to "N/A" by using the or operator, keeping the example code more concise while preserving behavior for empty strings.

Changes:

  • Replace ternary-style fallback (x if x else "N/A") with x or "N/A" for device.name and device.version.

@liudger liudger merged commit a78d10f into main Feb 11, 2026
26 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.

1 participant