fresh-mechanic-68429
06/26/2025, 4:23 AMhappy-kitchen-89482
06/26/2025, 3:01 PMhappy-kitchen-89482
06/26/2025, 3:02 PMhappy-kitchen-89482
06/26/2025, 3:03 PMfresh-mechanic-68429
06/26/2025, 3:29 PMfast-nail-55400
06/26/2025, 7:13 PMregister.py which calls the underlying backend’s registration methods but patches as you want and then returns those as the rules, target types, etc.fast-nail-55400
06/26/2025, 7:13 PMfast-nail-55400
06/26/2025, 7:14 PMfresh-mechanic-68429
06/26/2025, 7:14 PMfast-nail-55400
06/26/2025, 7:15 PMhappy-kitchen-89482
06/26/2025, 9:22 PMfresh-mechanic-68429
06/27/2025, 1:47 AMfast-nail-55400
06/27/2025, 2:22 AM.rules() get you TaskRule instances made by the @rule decorator. Maybe set canonical_name on your replacement rule to match the name of the underlying rule to be replaced?fast-nail-55400
06/27/2025, 2:23 AM@rule will infer the name based on the module in which the rule (your replacement) is defined.fresh-mechanic-68429
06/27/2025, 2:57 AMcanonical_name version to see if thats simpler
https://github.com/chris-smith-zocdoc/pants-custom-plugin-rule-override/blob/5b7ab[…]8c8d9650d8318399780392ae93375/pants-plugins/plugin1/register.pyfresh-mechanic-68429
06/27/2025, 3:08 AM