From 365f538bfb690891892505a1ab5f8e16e135c955 Mon Sep 17 00:00:00 2001 From: deathaxe Date: Wed, 21 Jan 2026 18:29:46 +0100 Subject: [PATCH] Sort imports and add explicitly exports This commit explicitly exports globals via `__all__` to prevent linters (e.g. pyright) to complain about use of implicit exports. Example: from sublime_lib import OutputPanel Without this commit warnings with following code changes are raised: from sublime_lib.panel import OutputPanel Note: Makes `# noqa F402` obsolete. --- sublime_lib/__init__.py | 40 ++++++++++++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 10 deletions(-) diff --git a/sublime_lib/__init__.py b/sublime_lib/__init__.py index 0ef227d..fc30afb 100644 --- a/sublime_lib/__init__.py +++ b/sublime_lib/__init__.py @@ -1,10 +1,30 @@ -from .panel import Panel, OutputPanel # noqa: F401 -from .resource_path import ResourcePath # noqa: F401 -from .show_selection_panel import show_selection_panel, NO_SELECTION # noqa: F401 -from .settings_dict import SettingsDict, NamedSettingsDict # noqa: F401 -from .syntax import list_syntaxes, get_syntax_for_scope # noqa: F401 -from .view_stream import ViewStream # noqa: F401 -from .view_utils import new_view, close_view, LineEnding # noqa: F401 -from .activity_indicator import ActivityIndicator # noqa: F401 -from .window_utils import new_window, close_window # noqa: F401 -from .region_manager import RegionManager # noqa: F401 +from .activity_indicator import ActivityIndicator +from .panel import Panel, OutputPanel +from .region_manager import RegionManager +from .resource_path import ResourcePath +from .settings_dict import NamedSettingsDict, SettingsDict +from .show_selection_panel import NO_SELECTION, show_selection_panel +from .syntax import list_syntaxes, get_syntax_for_scope +from .view_stream import ViewStream +from .view_utils import LineEnding, close_view, new_view +from .window_utils import close_window, new_window + +__all__ = [ + "ActivityIndicator", + "Panel", + "OutputPanel", + "RegionManager", + "ResourcePath", + "NamedSettingsDict", + "SettingsDict", + "NO_SELECTION", + "show_selection_panel", + "list_syntaxes", + "get_syntax_for_scope", + "ViewStream", + "LineEnding", + "close_view", + "new_view", + "close_window", + "new_window", +]