Skip to content

Commit aaa9087

Browse files
committed
Use more explicit imports
1 parent 54c16d5 commit aaa9087

File tree

3 files changed

+27
-16
lines changed

3 files changed

+27
-16
lines changed

ipyshiny/__init__.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,6 @@
55
__version__ = "0.1.0.9002"
66

77

8-
from ._ipyshiny import *
8+
from ._ipyshiny import output_widget, register_widget, render_widget, reactive_read
9+
10+
__all__ = ("output_widget", "register_widget", "render_widget", "reactive_read")

ipyshiny/_dependencies.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88
import tempfile
99
from typing import List, Optional
1010

11-
from ipywidgets import Widget, DOMWidget
12-
from ipywidgets._version import __html_manager_version__
11+
from ipywidgets.widgets.widget import Widget
12+
from ipywidgets.widgets.domwidget import DOMWidget
13+
from ipywidgets._version import (
14+
__html_manager_version__, # pyright: ignore[reportUnknownVariableType]
15+
)
1316
from jupyter_core.paths import jupyter_path # type: ignore
1417

1518

ipyshiny/_ipyshiny.py

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,33 @@
77
import inspect
88
import json
99
import os
10-
from typing import Callable, Awaitable, Sequence, Union, cast, Any, overload
10+
from typing import Any, Awaitable, Callable, Optional, Sequence, Union, cast, overload
1111
from uuid import uuid4
1212
from weakref import WeakSet
1313

14-
from ipywidgets.widgets.widget import (
15-
Widget,
16-
_remove_buffers,
17-
) # pyright: reportMissingTypeStubs=false, reportUnknownVariableType=false
18-
from ipywidgets._version import __protocol_version__
19-
20-
from htmltools import tags, Tag, TagList, css
14+
from htmltools import Tag, TagList, css, tags
2115
from htmltools._util import _package_dir
22-
from shiny import event, reactive
16+
from ipywidgets._version import (
17+
__protocol_version__, # pyright: ignore[reportUnknownVariableType]
18+
)
2319

20+
from ipywidgets.widgets.widget import (
21+
Widget,
22+
_remove_buffers, # pyright: ignore[reportUnknownVariableType, reportGeneralTypeIssues]
23+
)
24+
from shiny import Session, event, reactive
25+
from shiny._utils import run_coro_sync, wrap_async
2426
from shiny.http_staticfiles import StaticFiles
25-
from shiny.session import get_current_session, require_active_session
2627
from shiny.render import RenderFunction, RenderFunctionAsync
27-
from shiny._utils import run_coro_sync, wrap_async
28+
from shiny.session import get_current_session, require_active_session
2829

29-
from ._dependencies import *
30-
from ._comm import ShinyComm, ShinyCommManager, BufferType
30+
from ._comm import BufferType, ShinyComm, ShinyCommManager
31+
from ._dependencies import (
32+
libembed_dependency,
33+
output_binding_dependency,
34+
require_dependency,
35+
widget_pkg,
36+
)
3137

3238

3339
def output_widget(

0 commit comments

Comments
 (0)