<#21125 Export a `Rules` type for use in backends ...
# github-notifications
c
#21125 Export a `Rules` type for use in backends `rules` registration methods Issue created by kaos
Copy code
Should we consider exporting a `Rules` type, making this more ergonomic, and also makes it easier in the future to add/adjust this interface with less code impact?
Copy code
from pants.engine.rules import Rules

def rules() -> Rules:
  return ( ... )

# pants.engine.rules

Rules = TypeAlias[Iterable[Rule | UnionRule]]
_Originally posted by @kaos in #21124 (comment)_ pantsbuild/pants