From 0f74b7b0053d4c47ca24f48341a672454834e1d9 Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Thu, 21 Dec 2023 13:29:36 -0600 Subject: [PATCH 1/2] refactor!: Move _types to _internal/types --- src/tmuxp/{_types.py => _internal/types.py} | 2 +- src/tmuxp/plugin.py | 2 +- tests/fixtures/pluginsystem/partials/test_plugin_helpers.py | 2 +- .../tmuxp_test_plugin_fail/tmuxp_test_plugin_fail/plugin.py | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) rename src/tmuxp/{_types.py => _internal/types.py} (92%) diff --git a/src/tmuxp/_types.py b/src/tmuxp/_internal/types.py similarity index 92% rename from src/tmuxp/_types.py rename to src/tmuxp/_internal/types.py index 7e3eb7d7229..f2f834a1404 100644 --- a/src/tmuxp/_types.py +++ b/src/tmuxp/_internal/types.py @@ -6,7 +6,7 @@ >>> import typing as t >>> if t.TYPE_CHECKING: -... from tmuxp._types import PluginConfigSchema +... from tmuxp._internal.types import PluginConfigSchema ... """ import typing as t diff --git a/src/tmuxp/plugin.py b/src/tmuxp/plugin.py index 24a1de7d3f8..d93df72291a 100644 --- a/src/tmuxp/plugin.py +++ b/src/tmuxp/plugin.py @@ -32,7 +32,7 @@ from libtmux.window import Window from typing_extensions import TypedDict, TypeGuard, Unpack - from ._types import PluginConfigSchema + from ._internal.types import PluginConfigSchema class VersionConstraints(TypedDict): """Version constraints mapping for a tmuxp plugin.""" diff --git a/tests/fixtures/pluginsystem/partials/test_plugin_helpers.py b/tests/fixtures/pluginsystem/partials/test_plugin_helpers.py index 874a06c6422..935e029bfa6 100644 --- a/tests/fixtures/pluginsystem/partials/test_plugin_helpers.py +++ b/tests/fixtures/pluginsystem/partials/test_plugin_helpers.py @@ -6,7 +6,7 @@ if t.TYPE_CHECKING: from typing_extensions import Unpack - from tmuxp._types import PluginConfigSchema + from tmuxp._internal.types import PluginConfigSchema from ._types import PluginTestConfigSchema diff --git a/tests/fixtures/pluginsystem/plugins/tmuxp_test_plugin_fail/tmuxp_test_plugin_fail/plugin.py b/tests/fixtures/pluginsystem/plugins/tmuxp_test_plugin_fail/tmuxp_test_plugin_fail/plugin.py index a8cc86206ed..454f1f5b05a 100644 --- a/tests/fixtures/pluginsystem/plugins/tmuxp_test_plugin_fail/tmuxp_test_plugin_fail/plugin.py +++ b/tests/fixtures/pluginsystem/plugins/tmuxp_test_plugin_fail/tmuxp_test_plugin_fail/plugin.py @@ -4,7 +4,7 @@ from tmuxp.plugin import TmuxpPlugin if t.TYPE_CHECKING: - from tmuxp._types import PluginConfigSchema + from tmuxp._internal.types import PluginConfigSchema class PluginFailVersion(TmuxpPlugin): From 5b1f9408daf25947b7db7f04420e58abb76113fd Mon Sep 17 00:00:00 2001 From: Tony Narlock Date: Thu, 21 Dec 2023 13:32:35 -0600 Subject: [PATCH 2/2] docs(CHANGES): Note moving of _types to _internal/types --- CHANGES | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES b/CHANGES index df1dbc7baf5..70d5ab7a594 100644 --- a/CHANGES +++ b/CHANGES @@ -25,6 +25,7 @@ $ pipx install --suffix=@next 'tmuxp' --pip-args '\--pre' --force Improve styling via pydocstyle. - `config_reader`: Move to `tmuxp._internal` (#897) +- `_types`: Move to `tmuxp._internal` (#900) ## tmuxp 1.33.0 (2023-12-21)