Skip to content

Commit 2cb3d2b

Browse files
committed
chore(ruff): Manual fixes for plugin
src/tmuxp/plugin.py:143:17: B904 Within an `except` clause, raise exceptions with `raise ... from err` or `raise ... from None` to distinguish them from errors in exception handling src/tmuxp/plugin.py:143:17: TRY200 Use `raise from` to specify exception cause
1 parent f91f258 commit 2cb3d2b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tmuxp/plugin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ def _version_check(self) -> None:
139139
assert isinstance(constraints, dict)
140140
try:
141141
assert self._pass_version_check(**constraints)
142-
except AssertionError:
142+
except AssertionError as e:
143143
raise TmuxpPluginException(
144144
"Incompatible {dep} version: {version}\n{plugin_name} "
145145
"requirements:\nmin: {vmin} | max: {vmax} | "
146146
"incompatible: {incompatible}\n".format(
147147
dep=dep, plugin_name=self.plugin_name, **constraints
148148
)
149-
)
149+
) from e
150150

151151
def _pass_version_check(
152152
self,

0 commit comments

Comments
 (0)