Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

mypy: Add links to specific mypy bugs.

Anders Kaseorg8246ee7c57c6
diff --git a/zerver/actions/realm_settings.py b/zerver/actions/realm_settings.py
index 281e67f4db0..d22e9d62425 100644
--- a/zerver/actions/realm_settings.py
+++ b/zerver/actions/realm_settings.py
@@ -430,7 +430,7 @@ def do_change_realm_plan_type(
realm.message_visibility_limit = None
realm.upload_quota_gb = Realm.UPLOAD_QUOTA_STANDARD
elif plan_type == Realm.PLAN_TYPE_SELF_HOSTED:
- realm.max_invites = None # type: ignore[assignment] # Apparent mypy bug with Optional[int] setter.
+ realm.max_invites = None # type: ignore[assignment] # https://github.com/python/mypy/issues/3004
realm.message_visibility_limit = None
realm.upload_quota_gb = None
elif plan_type == Realm.PLAN_TYPE_STANDARD_FREE:
diff --git a/zerver/lib/markdown/__init__.py b/zerver/lib/markdown/__init__.py
index 97f9ae2efca..3c88ff0f555 100644
--- a/zerver/lib/markdown/__init__.py
+++ b/zerver/lib/markdown/__init__.py
@@ -602,7 +602,7 @@ class InlineImageProcessor(markdown.treeprocessors.Treeprocessor):
class BacktickInlineProcessor(markdown.inlinepatterns.BacktickInlineProcessor):
"""Return a `<code>` element containing the matching text."""
- def handleMatch( # type: ignore[override] # supertype incompatible with supersupertype
+ def handleMatch( # type: ignore[override] # https://github.com/python/mypy/issues/10197
self, m: Match[str], data: str
) -> Union[Tuple[None, None, None], Tuple[Element, int, int]]:
# Let upstream's implementation do its job as it is, we'll
@@ -1820,7 +1820,7 @@ class LinkifierPattern(CompiledInlineProcessor):
super().__init__(compiled_re2, md)
- def handleMatch( # type: ignore[override] # supertype incompatible with supersupertype
+ def handleMatch( # type: ignore[override] # https://github.com/python/mypy/issues/10197
self, m: Match[str], data: str
) -> Union[Tuple[Element, int, int], Tuple[None, None, None]]:
db_data: Optional[DbData] = self.md.zulip_db_data
@@ -1840,7 +1840,7 @@ class LinkifierPattern(CompiledInlineProcessor):
class UserMentionPattern(CompiledInlineProcessor):
- def handleMatch( # type: ignore[override] # supertype incompatible with supersupertype
+ def handleMatch( # type: ignore[override] # https://github.com/python/mypy/issues/10197
self, m: Match[str], data: str
) -> Union[Tuple[None, None, None], Tuple[Element, int, int]]:
name = m.group("match")
@@ -1896,7 +1896,7 @@ class UserMentionPattern(CompiledInlineProcessor):
class UserGroupMentionPattern(CompiledInlineProcessor):
- def handleMatch( # type: ignore[override] # supertype incompatible with supersupertype
+ def handleMatch( # type: ignore[override] # https://github.com/python/mypy/issues/10197
self, m: Match[str], data: str
) -> Union[Tuple[None, None, None], Tuple[Element, int, int]]:
name = m.group("match")
@@ -1936,7 +1936,7 @@ class StreamPattern(CompiledInlineProcessor):
stream_id = db_data.stream_names.get(name)
return stream_id
- def handleMatch( # type: ignore[override] # supertype incompatible with supersupertype
+ def handleMatch( # type: ignore[override] # https://github.com/python/mypy/issues/10197
self, m: Match[str], data: str
) -> Union[Tuple[None, None, None], Tuple[Element, int, int]]:
name = m.group("stream_name")
@@ -1967,7 +1967,7 @@ class StreamTopicPattern(CompiledInlineProcessor):
stream_id = db_data.stream_names.get(name)
return stream_id
- def handleMatch( # type: ignore[override] # supertype incompatible with supersupertype
+ def handleMatch( # type: ignore[override] # https://github.com/python/mypy/issues/10197
self, m: Match[str], data: str
) -> Union[Tuple[None, None, None], Tuple[Element, int, int]]:
stream_name = m.group("stream_name")
@@ -2076,7 +2076,7 @@ class LinkInlineProcessor(markdown.inlinepatterns.LinkInlineProcessor):
return el
- def handleMatch( # type: ignore[override] # supertype incompatible with supersupertype
+ def handleMatch( # type: ignore[override] # https://github.com/python/mypy/issues/10197
self, m: Match[str], data: str
) -> Union[Tuple[None, None, None], Tuple[Element, int, int]]:
ret = super().handleMatch(m, data)