Skip to content

Commit f56d3de

Browse files
committed
chore(ruff) ruff v0.12 aggressive fixes
uv run ruff check --select ALL . --fix --unsafe-fixes --preview --show-fixes; uv run ruff format . Fixed 6 errors: - src/tmuxp/__init__.py: 1 × RUF100 (unused-noqa) - src/tmuxp/workspace/builder.py: 1 × ISC003 (explicit-string-concatenation) 1 × EM101 (raw-string-in-exception) - src/tmuxp/workspace/finders.py: 1 × ISC003 (explicit-string-concatenation) - src/tmuxp/workspace/validation.py: 2 × ISC003 (explicit-string-concatenation) Found 1116 errors (6 fixed, 1110 remaining).
1 parent c02b982 commit f56d3de

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

src/tmuxp/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# flake8: NOQA: F401
21
"""tmux session manager.
32
43
:copyright: Copyright 2013- Tony Narlock.

src/tmuxp/workspace/builder.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,12 @@ def build(self, session: Session | None = None, append: bool = False) -> None:
240240
"""
241241
if not session:
242242
if not self.server:
243-
raise exc.TmuxpException(
243+
msg = (
244244
"WorkspaceBuilder.build requires server to be passed "
245-
+ "on initialization, or pass in session object to here.",
245+
"on initialization, or pass in session object to here."
246+
)
247+
raise exc.TmuxpException(
248+
msg,
246249
)
247250
new_session_kwargs = {}
248251
if "start_directory" in self.session_config:

src/tmuxp/workspace/finders.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def find_workspace_file(
194194
if not candidates:
195195
file_error = (
196196
"workspace-file not found "
197-
+ f"in workspace dir (yaml/yml/json) {workspace_dir} for name"
197+
f"in workspace dir (yaml/yml/json) {workspace_dir} for name"
198198
)
199199
else:
200200
candidates = [

src/tmuxp/workspace/validation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ class InvalidPluginsValidationError(SchemaValidationError):
5050
def __init__(self, plugins: t.Any, *args: object, **kwargs: object) -> None:
5151
return super().__init__(
5252
'"plugins" only supports list type. '
53-
+ f" Received {type(plugins)}, "
54-
+ f"value: {plugins}",
53+
f" Received {type(plugins)}, "
54+
f"value: {plugins}",
5555
*args,
5656
**kwargs,
5757
)

0 commit comments

Comments
 (0)