Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package/tests/test_PartSeg/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def start(self, time=None):
else:
old_start(self)

def not_start(self):
def not_start(self, time=None):
raise RuntimeError("Thread should not be used in test")
Comment on lines +93 to 94
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Silence Ruff ARG001 for the unused stub parameters.

Ruff flags unused self and time here. Either ignore via # noqa: ARG001 or accept arbitrary args to keep lint clean.

💡 Minimal fix
-    def not_start(self, time=None):
+    def not_start(*_, **__):
         raise RuntimeError("Thread should not be used in test")
🧰 Tools
🪛 Ruff (0.14.14)

[warning] 93-93: Unused function argument: self

(ARG001)


[warning] 93-93: Unused function argument: time

(ARG001)


[warning] 94-94: Avoid specifying long messages outside the exception class

(TRY003)

🤖 Prompt for AI Agents
In `@package/tests/test_PartSeg/conftest.py` around lines 93 - 94, The stub method
not_start currently raises a RuntimeError but its signature (self, time=None)
triggers Ruff ARG001 for unused args; update the not_start definition to either
accept arbitrary args (def not_start(self, *args, **kwargs):) or annotate the
existing parameters with a noqa (e.g. def not_start(self, time=None):  # noqa:
ARG001) and keep the RuntimeError, referencing the not_start method to locate
the change.


monkeypatch.setattr(QTimer, "start", not_start)
Expand Down
Loading