Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use traits.api, traitsui.api and pyface.api where possible. #566

Merged
merged 1 commit into from
Feb 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion enable/colors.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@

if not ETSConfig.toolkit:
# Force Traits to decide on its toolkit if it hasn't already
from traitsui.toolkit import toolkit as traits_toolkit
from traitsui.api import toolkit as traits_toolkit

traits_toolkit()

Expand Down
3 changes: 1 addition & 2 deletions enable/savage/trait_defs/ui/svg_button_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@

from traits.api import Bool, Enum, Int, Property, Range, Str, Any

from traitsui.api import View
from traitsui.basic_editor_factory import BasicEditorFactory
from traitsui.api import BasicEditorFactory, View
from traitsui.ui_traits import AView

# -----------------------------------------------------------------------------
Expand Down
3 changes: 1 addition & 2 deletions enable/savage/trait_defs/ui/svg_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@
from enable.savage.trait_defs.ui.toolkit import toolkit_object

from traits.api import Property

from traitsui.basic_editor_factory import BasicEditorFactory
from traitsui.api import BasicEditorFactory

# -----------------------------------------------------------------------------
# 'SVGEditor' editor factory class:
Expand Down
2 changes: 1 addition & 1 deletion enable/savage/trait_defs/ui/toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def _init_toolkit():
"""

# Force Traits to decide on its toolkit if it hasn't already
from traitsui.toolkit import toolkit as traits_toolkit
from traitsui.api import toolkit as traits_toolkit

traits_toolkit()

Expand Down
2 changes: 1 addition & 1 deletion enable/tests/primitives/test_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from kiva.image import GraphicsContext
from traits.api import TraitError
from traits.testing.unittest_tools import UnittestTools
from traits.testing.api import UnittestTools

from enable.primitives.image import Image

Expand Down
2 changes: 1 addition & 1 deletion enable/tests/qt4/test_scrollbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import unittest

from enable.tests._testing import skip_if_not_qt
from pyface.gui import GUI
from pyface.api import GUI

from enable.container import Container
from enable.window import Window
Expand Down
6 changes: 2 additions & 4 deletions enable/tests/test_component_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
import unittest

from enable.component_editor import ComponentEditor
from traits.has_traits import HasTraits
from traits.trait_types import Any
from traitsui.item import Item
from traitsui.view import View
from traits.api import Any, HasTraits
from traitsui.api import Item, View

from enable.tests._testing import get_dialog_size, skip_if_null

Expand Down
2 changes: 1 addition & 1 deletion enable/tests/tools/pyface/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from unittest.mock import MagicMock

# Enthought library imports
from traits.testing.unittest_tools import UnittestTools
from traits.testing.api import UnittestTools

# Local library imports
from enable.component import Component
Expand Down
2 changes: 1 addition & 1 deletion enable/tests/tools/pyface/test_move_command_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Enthought library imports
from pyface.undo.api import CommandStack
from traits.testing.unittest_tools import UnittestTools
from traits.testing.api import UnittestTools

# Local library imports
from enable.component import Component
Expand Down
2 changes: 1 addition & 1 deletion enable/tests/tools/pyface/test_resize_command_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Enthought library imports
from pyface.undo.api import CommandStack
from traits.testing.unittest_tools import UnittestTools
from traits.testing.api import UnittestTools

# Local library imports
from enable.component import Component
Expand Down
2 changes: 1 addition & 1 deletion enable/tests/tools/pyface/test_undo_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

# Enthought library imports
from pyface.undo.api import UndoManager
from traits.testing.unittest_tools import UnittestTools
from traits.testing.api import UnittestTools

# Local library imports
from enable.base_tool import KeySpec
Expand Down
2 changes: 1 addition & 1 deletion enable/tests/tools/test_button_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#
import unittest

from traits.testing.unittest_tools import UnittestTools
from traits.testing.api import UnittestTools

from enable.component import Component
from enable.testing import EnableTestAssistant
Expand Down
2 changes: 1 addition & 1 deletion enable/toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def _init_toolkit():

if not ETSConfig.toolkit:
# Force Traits to decide on its toolkit if it hasn't already
from traitsui.toolkit import toolkit as traits_toolkit
from traitsui.api import toolkit as traits_toolkit

traits_toolkit()

Expand Down
3 changes: 1 addition & 2 deletions enable/trait_defs/ui/wx/rgba_color_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,8 @@
from traits.api import Bool
from traits.trait_base import SequenceTypes

from traitsui.api import View
from traitsui.api import EditorFactory, View
from traitsui.wx.editor import Editor
from traitsui.editor_factory import EditorFactory
from traitsui.wx.editor_factory import ReadonlyEditor
from traitsui.wx.helper import position_window

Expand Down