ISISComputingGroup/genie

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

開放

#59 建立於 2025年10月9日

 (0 則留言) (0 個反應) (0 位負責人)Python (0 個分叉)auto 404
good first issue

倉庫指標

星標
 (1 顆星)
PR 合併指標
 (平均合併 7天 10小時) (30 天內合併 3 個 PR)

描述

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

貢獻者指南