Skip to content
  • Taylor Cramer's avatar
    Propagate container_type and include it in type equality checks. · 4ed574ab
    Taylor Cramer authored
    Previously, NamedTupleTypeWithPyContainerType was often lost and turned into
    a NamedTupleType without the container. This resulted in users being given
    AnonymousTuples when a more specific container should have been returned.
    
    This change fixes a large number of sites where container types were lost, and
    adjusts usage sites as appropriate, including the removal of `from_tff_result`
    functions.
    
    This change also makes the `__eq__` function for
    `NamedTupleTypeWithPyContainerType` require equivalent container types, rather
    than just equivalent field structure. Call sites that wished to compare only
    field structure are adjusted to use `Type.{is, check}_equivalent_to`.
    
    PiperOrigin-RevId: 321883012
    4ed574ab