careful-address-89803
11/17/2022, 4:19 AMFlake8LockfileSentinel
). Problem is, that class now exists only at runtime. Is there a simple way to go from the tool (class Flake8(PythonToolBase):
) to whatever the concrete class of the UnionRule is ( whatever was used as the 2nd argument in`UnionRule(GenerateToolLockfileSentinel, Flake8LockfileSentinel)`) ? I could fish it out of the generated rules, but that doesn't seem like something Pants wants anyone to do.curved-television-6568
11/17/2022, 2:18 PMUnionMembership
?
so perhaps something like:
@rule
async def get_concrete_class(union_membership: UnionMembership) -> x:
for member_cls in union_membership.get(GenerateToolLockfileSentinel):
if is_what_i_want(member_cls):
...
would need some common base class or other to identify the concrete class with among all the registered sentinel classes I guess..careful-address-89803
11/17/2022, 2:32 PMcareful-address-89803
11/20/2022, 10:27 PMQueryRule(GeneratePythonLockfile, [lockfile_cls])
. Is there a better way to formulate the QueryRule?curved-television-6568
11/20/2022, 11:22 PMcurved-television-6568
11/20/2022, 11:48 PMcurved-television-6568
11/20/2022, 11:49 PMcurved-television-6568
11/21/2022, 12:04 AM