Repository: tmux-python/tmuxp (language: python)

Issue:
Move `_types` to `_internal/types`
Move `_types` to `_internal/types`

This makes #895 / #898 much cleaner.


Discussion / hints:

Fix patch:
diff --git a/CHANGES b/CHANGES
index df1dbc7baf..70d5ab7a59 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)
 
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 7e3eb7d722..f2f834a140 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 24a1de7d3f..d93df72291 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."""


Test patch:
diff --git a/tests/fixtures/pluginsystem/partials/test_plugin_helpers.py b/tests/fixtures/pluginsystem/partials/test_plugin_helpers.py
index 874a06c642..935e029bfa 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 a8cc86206e..454f1f5b05 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):