traits icon indicating copy to clipboard operation
traits copied to clipboard

Remove traits.has_traits.any_trait

Open mdickinson opened this issue 3 years ago • 1 comments

There's an any_trait constant exposed in the traits.has_traits module. It's not documented, tested, exposed in traits.api, or used within Traits or elsewhere in ETS, and I haven't found uses in other Traits-using projects. The spelling is also confusing: the underscore conflicts with the magic anytrait naming used in Traits. I propose that we delete it.

Code: https://github.com/enthought/traits/blob/8ec7fb793278c4706fe34d9096baa56e106f7dc2/traits/has_traits.py#L119-L120

mdickinson avatar Feb 23 '21 11:02 mdickinson

Apologies: it is used, here: https://github.com/enthought/traits/blob/8ec7fb793278c4706fe34d9096baa56e106f7dc2/traits/has_traits.py#L3105

Given that, it's probably enough just to make it "private" by renaming; I suggest _any_ctrait as the new name.

mdickinson avatar Feb 23 '21 11:02 mdickinson