Skip to content

Conversation

@tpoliaw
Copy link
Contributor

@tpoliaw tpoliaw commented Jan 30, 2026

The previous check for whether a parameter was a bluesky device (and
would therefore go via the string-to-device lookup) was based on the
type being an instance of one of the bluesky protocols.

For a device that only extends Device, this check would return False
and the device could not be injected.

Including a check for the type being a subclass of Device allows all
device subclasses to be looked up.

@tpoliaw tpoliaw linked an issue Jan 30, 2026 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jan 30, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.03%. Comparing base (e2fd3f0) to head (64cd872).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1368   +/-   ##
=======================================
  Coverage   95.03%   95.03%           
=======================================
  Files          43       43           
  Lines        2782     2782           
=======================================
  Hits         2644     2644           
  Misses        138      138           

☔ 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.

@tpoliaw tpoliaw marked this pull request as ready for review January 30, 2026 17:36
@tpoliaw tpoliaw requested a review from a team as a code owner January 30, 2026 17:36
The previous check for whether a parameter was a bluesky device (and
would therefore go via the string-to-device lookup) was based on the
type being an instance of one of the bluesky protocols.

For a device that only extends `Device`, this check would return False
and the device could not be injected.

Including a check for the type being a subclass of Device allows all
device subclasses to be looked up.
get_origin returns 'Any | None' so we should accept the same
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.

Classes that only extend Device aren't treated as BlueskyDevices

2 participants