nebius/SWE-bench-extra huggingface dataset:
Repository: zooniverse/panoptes-python-client

Issue:
Raise something better than StopIteration in .find() when nothing is found
https://github.com/zooniverse/panoptes-python-client/blob/67e11e16cd91689e62939a6ba54ff7769259a525/panoptes_client/panoptes.py#L428

Comments:

Patch:
diff --git a/panoptes_client/project.py b/panoptes_client/project.py
index fa67fd1..807d3b7 100644
--- a/panoptes_client/project.py
+++ b/panoptes_client/project.py
@@ -30,7 +30,12 @@ class Project(PanoptesObject):
     def find(cls, id='', slug=None):
         if not id and not slug:
             return None
-        return cls.where(id=id, slug=slug).next()
+        try:
+            return cls.where(id=id, slug=slug).next()
+        except StopIteration:
+            raise PanoptesAPIException(
+                "Could not find project with slug='{}'".format(slug)
+            )
 
     def get_export(
         self,


Test patch:
diff --git a/panoptes_client/tests/test_project.py b/panoptes_client/tests/test_project.py
index d900b75..14effae 100644
--- a/panoptes_client/tests/test_project.py
+++ b/panoptes_client/tests/test_project.py
@@ -1,6 +1,7 @@
 import unittest
 
 from panoptes_client import Project
+from panoptes_client.panoptes import PanoptesAPIException
 
 
 class TestProject(unittest.TestCase):
@@ -17,5 +18,5 @@ class TestProject(unittest.TestCase):
         self.assertEqual(p, None)
 
     def test_find_unknown_slug(self):
-        with self.assertRaises(StopIteration):
+        with self.assertRaises(PanoptesAPIException):
             Project.find(slug='invalid_slug')
Repository: zulip/zulip-terminal

Issue:
Render @topic wildcard mentions correctly when displayed in a message feed.
[CZO discussion](https://chat.zulip.org/#narrow/stream/378-api-design/topic/.40topic-mention.20data-user-id.20.2326195/near/1605762)

For stream wildcard mentions (all, everyone, stream), the rendered content is:
```
<span class="user-mention" data-user-id="*">@{stream_wildcard}</span>
```
As a part of the @topic wildcard mentions project ( [#22829](https://github.com/zulip/zulip/issues/22829) ) , we have introduced `@topic`; the rendered content is:
```
<span class="topic-mention">@{topic_wildcard}</span>
```

Since we are not using `user-mention` class (and data-user-id="*" attribute), the `@topic` mention is not rendered correctly.

[#26195 (comment)](https://github.com/zulip/zulip/pull/26195)

Comments:

Patch:
diff --git a/zulipterminal/ui_tools/messages.py b/zulipterminal/ui_tools/messages.py
index 1598306..1a9bb9d 100644
--- a/zulipterminal/ui_tools/messages.py
+++ b/zulipterminal/ui_tools/messages.py
@@ -442,9 +442,10 @@ class MessageBox(urwid.Pile):
 
                 markup.append(("msg_math", tag_text))
             elif tag == "span" and (
-                {"user-group-mention", "user-mention"} & set(tag_classes)
+                {"user-group-mention", "user-mention", "topic-mention"}
+                & set(tag_classes)
             ):
-                # USER MENTIONS & USER-GROUP MENTIONS
+                # USER, USER-GROUP & TOPIC MENTIONS
                 markup.append(("msg_mention", tag_text))
             elif tag == "a":
                 # LINKS


Test patch:
diff --git a/tests/ui_tools/test_messages.py b/tests/ui_tools/test_messages.py
index f56da14..d4d9e80 100644
--- a/tests/ui_tools/test_messages.py
+++ b/tests/ui_tools/test_messages.py
@@ -114,6 +114,11 @@ class TestMessageBox:
                 [("msg_mention", "@A Group")],
                 id="group-mention",
             ),
+            case(
+                '<span class="topic-mention">@topic',
+                [("msg_mention", "@topic")],
+                id="topic-mention",
+            ),
             case("<code>some code", [("pygments:w", "some code")], id="inline-code"),
             case(
                 '<div class="codehilite" data-code-language="python">'