You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm seeing basically the same problem as #148 with ToFourMomentum, which I use in func-adl-uproot to create vector objects:
self=<func_adl.type_based_replacement.remap_by_types.<locals>.type_transformerobjectat0x7f016eee1400>node=<ast.Attributeobjectat0x7f016f56fe50>defvisit_Attribute(self, node: ast.Attribute) ->Any:
t_node=self.generic_visit(node)
assertisinstance(t_node, ast.Attribute)
# If this is a dict reference, then figure out what the# type is for that value of the dict.ifisinstance(t_node.value, ast.Dict):
key=t_node.attrkey_index= [
efore, kinenumerate(t_node.value.keys) ifk.value==key# type: ignore
]
iflen(key_index) ==0:
ift_node.attr.lower() =="zip":
returnt_node>raiseValueError(f"Key {key} not found in dict expression!!")
EValueError: KeyToFourMomentumnotfoundindictexpression!!
I think I use other functions in a pattern like this (not just Zip() and ToFourMomentum()), and I can imagine this would be a common type of thing for backends to add, so probably this should not raise an error and be a warning at most...
The text was updated successfully, but these errors were encountered:
I'm seeing basically the same problem as #148 with
ToFourMomentum
, which I use infunc-adl-uproot
to createvector
objects:This is coming from something like:
I think I use other functions in a pattern like this (not just
Zip()
andToFourMomentum()
), and I can imagine this would be a common type of thing for backends to add, so probably this should not raise an error and be a warning at most...The text was updated successfully, but these errors were encountered: