ISISComputingGroup/genie

load_script type checking - allow `np` datatypes in `cset` / `PVValue`

Aperta

#59 aperta il 9 ott 2025

 (0 commenti) (0 reazioni) (0 assegnatari)Python (0 fork)auto 404
good first issue

Metriche repository

Star
 (1 stella)
Metriche merge PR
 (Merge medio 7g 10h) (3 PR mergiate in 30 g)

Descrizione

As a user on MERLIN I would like the following snippet to pass type checking:

import numpy as np
from genie_python import genie as g

def runscript():
    for psi in np.arange(30,130,10):
        g.cset("Rot", psi, lowlimit=psi-0.1, highlimit=psi+0.1, runcontrol=True)

It currently fails with:

E: Argument of type "signedinteger[Any]" cannot be assigned to parameter "args" of type "PVValue"

PVValue should also include np types

Acceptance criteria

  • Above snippet passes type checking

Guida contributor