Skip to content

Commit

Permalink
Remove some deprecated trait types and instances; reorder api.py (#1723)
Browse files Browse the repository at this point in the history
This PR:

- Removes long-deprecated trait type aliases of the form `DictStrAny`,
`DictStrFloat`, `ListFloat`, `ListThis`, etc.
- Reorders the top-level `api.py` so that the deprecated trait types
appear at the bottom of the file.
  • Loading branch information
mdickinson committed Oct 17, 2022
1 parent ecf5de5 commit d536bba
Show file tree
Hide file tree
Showing 12 changed files with 12 additions and 449 deletions.
30 changes: 0 additions & 30 deletions docs/source/traits_api_reference/trait_types.rst
Original file line number Diff line number Diff line change
Expand Up @@ -287,36 +287,6 @@ and may be removed in a future version of Traits.

.. autodata:: undefined

.. autodata:: ListInt

.. autodata:: ListFloat

.. autodata:: ListStr

.. autodata:: ListUnicode

.. autodata:: ListComplex

.. autodata:: ListBool

.. autodata:: ListFunction

.. autodata:: ListMethod

.. autodata:: ListThis

.. autodata:: DictStrAny

.. autodata:: DictStrStr

.. autodata:: DictStrInt

.. autodata:: DictStrFloat

.. autodata:: DictStrBool

.. autodata:: DictStrList


Private Classes
---------------
Expand Down
39 changes: 12 additions & 27 deletions traits/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,33 +116,6 @@
Supports,
)

# Deprecated TraitType subclasses and instances.

from .trait_types import (
BaseUnicode,
Unicode,
BaseCUnicode,
CUnicode,
false,
true,
undefined,
ListInt,
ListFloat,
ListStr,
ListUnicode,
ListComplex,
ListBool,
ListFunction,
ListMethod,
ListThis,
DictStrAny,
DictStrStr,
DictStrInt,
DictStrFloat,
DictStrBool,
DictStrList,
)

from .trait_types import (
BaseCallable,
BaseInt,
Expand Down Expand Up @@ -218,3 +191,15 @@
)

from .trait_numeric import Array, ArrayOrNone, CArray

# Deprecated TraitType subclasses and instances.

from .trait_types import (
BaseUnicode,
Unicode,
BaseCUnicode,
CUnicode,
false,
true,
undefined,
)
15 changes: 0 additions & 15 deletions traits/api.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -135,21 +135,6 @@ from .trait_types import (
false as false,
true as true,
undefined as undefined,
ListInt as ListInt,
ListFloat as ListFloat,
ListStr as ListStr,
ListUnicode as ListUnicode,
ListComplex as ListComplex,
ListBool as ListBool,
ListFunction as ListFunction,
ListMethod as ListMethod,
ListThis as ListThis,
DictStrAny as DictStrAny,
DictStrStr as DictStrStr,
DictStrInt as DictStrInt,
DictStrFloat as DictStrFloat,
DictStrBool as DictStrBool,
DictStrList as DictStrList,
)

from .trait_types import (
Expand Down
33 changes: 0 additions & 33 deletions traits/stubs_tests/examples/DictStrAny.py

This file was deleted.

36 changes: 0 additions & 36 deletions traits/stubs_tests/examples/DictStrFloat.py

This file was deleted.

36 changes: 0 additions & 36 deletions traits/stubs_tests/examples/DictStrInt.py

This file was deleted.

36 changes: 0 additions & 36 deletions traits/stubs_tests/examples/ListBool.py

This file was deleted.

34 changes: 0 additions & 34 deletions traits/stubs_tests/examples/ListComplex.py

This file was deleted.

33 changes: 0 additions & 33 deletions traits/stubs_tests/examples/ListFloat.py

This file was deleted.

33 changes: 0 additions & 33 deletions traits/stubs_tests/examples/ListInt.py

This file was deleted.

0 comments on commit d536bba

Please sign in to comment.