bitter-ability-32190
09/28/2022, 1:33 AMunions.py
union
to just set _is_union
to True
instead of the weird self-reference (why is that btw?)
But doing so there and in <http://mod.rs|mod.rs>
yields errors about unions not being registered for a type that is registered špub fn is_union(py: Python, v: &PyType) -> PyResult<bool> {
let is_union_for_attr = intern!(py, "_is_union");
Ok(v.hasattr(is_union_for_attr)?)
}
and
cls._is_union = True
lead to errors such as:
Exception: Invalid Get. Because an input type for `Get(GenerateJvmLockfileFromTool, ScalafmtToolLockfileSentinel, <pants.backend.scala.lint.scalafmt.rules.ScalafmtToolLockfileSentinel object at 0x7f4a2c04ec10>)` was annotated with `@union`, the value for that type should be a member of that union. Did you intend to register a `UnionRule`? If not, you may be using the incorrect explicitly declared type.
witty-crayon-22786
09/28/2022, 3:20 AMWeird behavior: Iām looking at changingbecause otherwise subclasses of the union will also be considered to be unions due to having the fieldunions.py
to just setunion
to_is_union
instead of the weird self-reference (why is that btw?)True
bitter-ability-32190
09/28/2022, 10:46 AM