From 6c49fcba35d5b75dbdaf9262ab6103d0d589c078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Natt=C5=8Dsai=20Mit=C5=8D?= Date: Tue, 19 Sep 2023 10:59:41 +0900 Subject: [PATCH] expose 'DragContext' right under the root namespace --- src/kivy_garden/draggable/__init__.py | 3 ++- src/kivy_garden/draggable/_impl.py | 4 ---- src/kivy_garden/draggable/_utils.py | 6 ------ tests/test_import.py | 1 + 4 files changed, 3 insertions(+), 11 deletions(-) diff --git a/src/kivy_garden/draggable/__init__.py b/src/kivy_garden/draggable/__init__.py index 8052073..71de41f 100644 --- a/src/kivy_garden/draggable/__init__.py +++ b/src/kivy_garden/draggable/__init__.py @@ -1,9 +1,10 @@ __all__ = ( + 'DragContext', 'KXDraggableBehavior', 'KXDroppableBehavior', 'KXReorderableBehavior', 'save_widget_state', 'restore_widget_state', 'save_widget_location', 'restore_widget_location', 'ongoing_drags', ) -from ._impl import KXDraggableBehavior, KXDroppableBehavior, KXReorderableBehavior, ongoing_drags +from ._impl import KXDraggableBehavior, KXDroppableBehavior, KXReorderableBehavior, ongoing_drags, DragContext from ._utils import save_widget_state, restore_widget_state from ._utils import save_widget_location, restore_widget_location diff --git a/src/kivy_garden/draggable/_impl.py b/src/kivy_garden/draggable/_impl.py index 440b1e7..4c903be 100644 --- a/src/kivy_garden/draggable/_impl.py +++ b/src/kivy_garden/draggable/_impl.py @@ -1,7 +1,3 @@ -__all__ = ( - 'KXDraggableBehavior', 'KXDroppableBehavior', 'KXReorderableBehavior', - 'ongoing_drags', -) from typing import List, Tuple, Union from inspect import isawaitable from dataclasses import dataclass diff --git a/src/kivy_garden/draggable/_utils.py b/src/kivy_garden/draggable/_utils.py index 3122b83..da3d3a9 100644 --- a/src/kivy_garden/draggable/_utils.py +++ b/src/kivy_garden/draggable/_utils.py @@ -1,9 +1,3 @@ -__all__ = ( - 'temp_transform', - 'save_widget_state', 'restore_widget_state', - 'save_widget_location', 'restore_widget_location', -) - from weakref import ref from copy import deepcopy diff --git a/tests/test_import.py b/tests/test_import.py index b16d202..67aed40 100644 --- a/tests/test_import.py +++ b/tests/test_import.py @@ -3,6 +3,7 @@ def test_flower(): from kivy_garden.draggable import ( + DragContext, KXDraggableBehavior, KXDroppableBehavior, KXReorderableBehavior, restore_widget_state, save_widget_state, restore_widget_location, save_widget_location, ongoing_drags,