Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken typing #826

Closed
dperl-dls opened this issue Oct 9, 2024 · 1 comment · Fixed by #830
Closed

Fix broken typing #826

dperl-dls opened this issue Oct 9, 2024 · 1 comment · Fixed by #830
Assignees

Comments

@dperl-dls
Copy link
Collaborator

dperl-dls commented Oct 9, 2024

The recent release of Bluesky added a bunch of typing which has revealed inconsistencies in typing in dodal, we should fix it

Some of these are inconsistencies between bluesky & ophyd, eg:

  /scratch/ziq44869/development/dodal/src/dodal/devices/util/adjuster_plans.py:24:32 - error: Argument of type "EpicsMotor | Motor" cannot be assigned to parameter "obj" of type "Movable" in function "abs_set"
    Type "EpicsMotor | Motor" is not assignable to type "Movable"
      "EpicsMotor" is incompatible with protocol "Movable"
        "set" is an incompatible type
          Type "(new_position: Any, *, timeout: float = None, moved_cb: (...) -> Unknown = None, wait: bool = False) -> StatusBase" is not assignable to type "(value: Unknown) -> Status"
            Parameter name mismatch: "value" versus "new_position"
            "None" is not assignable to "float"
            Type "None" is not assignable to type "(...) -> Unknown"
            Function return type "StatusBase" is incompatible with type "Status" (reportArgumentType)

These should be ignored and labeled

Acceptance Criteria

  • Linting succeeds and nothing else is broken
@dperl-dls
Copy link
Collaborator Author

Since fixing this properly will require updates to Bluesky/Ophyd I will make a new issue for removing the relevant ignore statements when that is done: #827

dperl-dls added a commit that referenced this issue Oct 9, 2024
dperl-dls added a commit that referenced this issue Oct 9, 2024
* (#826) fix or ignore and note typing errors

* (#826) update ophyd-async dependency

* (#826) put upper bound on ophyd-async for safety

* (#826) make backlight conform to Moveable
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 a pull request may close this issue.

1 participant