This PR changes the Tuple trait type so that it only ever accepts instances of type tuple. Previously, the argument-less trait type Tuple() would accept (and coerce) list instances in addition to tuple instances, while with arguments (e.g., Tuple(Int(), Int()), only tuples would be accepted.
Work towards #1626, but this PR doesn't change the behaviour of the BaseTuple trait type at all.
Checklist
[x] Tests
[ ] Update API reference (docs/source/traits_api_reference) N/A
[ ] Update User manual (docs/source/traits_user_manual) N/A
[ ] Update type annotation hints in traits-stubs N/A
This PR changes the
Tuple
trait type so that it only ever accepts instances of typetuple
. Previously, the argument-less trait typeTuple()
would accept (and coerce)list
instances in addition totuple
instances, while with arguments (e.g.,Tuple(Int(), Int())
, only tuples would be accepted.Work towards #1626, but this PR doesn't change the behaviour of the
BaseTuple
trait type at all.Checklist
docs/source/traits_api_reference
) N/Adocs/source/traits_user_manual
) N/Atraits-stubs
N/A