DiamondLightSource / DiamondLightSource/test-rig-bluesky

Investigation: Should fly_scan have a -> MsgGenerator[None] return annotation?

Open
#45 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
0
Forks
3
PR merge metrics
No merged PRs in 30d

Description

`fly_scan `is the only plan in the file missing a -> MsgGenerator[None] return type annotation, which is inconsistent and causes pyright to infer a broader type.

Investigate:

- Does omitting the annotation actually cause a pyright error currently, or does inference cover it?
- Are there any downstream consumers (e.g. BlueAPI introspection) that depend on the return type annotation being explicit?
- If yes to either: add the annotation. If pyright is already satisfied by inference and BlueAPI doesn't require it, document why it is intentionally omitted.

Contributor guide

Open the contributing guide

Research direction

Start in the file containing the other plans and compare fly_scan with their return annotations. Run pyright to check whether inference reports an error, then search BlueAPI introspection consumers for dependencies on explicit annotations. Done means confirming the requirement and either adding the annotation or documenting why omission is intentional.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.