mypy: Add links to specific mypy bugs.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2022-07-05 12:21:44 -07:00
committed by Tim Abbott
parent feff1d0411
commit 8246ee7c57
2 changed files with 8 additions and 8 deletions

View File

@@ -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:

View File

@@ -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)