Skip to content
This repository was archived by the owner on Apr 26, 2024. It is now read-only.

Commit 87d1c1d

Browse files
author
Mathieu Velten
committed
Fix mypy
1 parent 169b47c commit 87d1c1d

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

scripts-dev/release.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,7 @@ def _prepare() -> None:
219219
update_branch(repo)
220220

221221
# Create the new release branch
222-
# Type ignore will no longer be needed after GitPython 3.1.28.
223-
# See https://github.com/gitpython-developers/GitPython/pull/1419
224-
repo.create_head(release_branch_name, commit=base_branch) # type: ignore[arg-type]
222+
repo.create_head(release_branch_name, commit=base_branch)
225223

226224
# Special-case SyTest: we don't actually prepare any files so we may
227225
# as well push it now (and only when we create a release branch;

synapse/streams/events.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,7 @@ def get_sources(self) -> Iterator[Tuple[str, EventSource]]:
4545
class EventSources:
4646
def __init__(self, hs: "HomeServer"):
4747
self.sources = _EventSourcesInner(
48-
# mypy thinks attribute.type is `Optional`, but we know it's never `None` here since
49-
# all the attributes of `_EventSourcesInner` are annotated.
50-
*(attribute.type(hs) for attribute in attr.fields(_EventSourcesInner)) # type: ignore[misc]
48+
*(attribute.type(hs) for attribute in attr.fields(_EventSourcesInner))
5149
)
5250
self.store = hs.get_datastores().main
5351

0 commit comments

Comments
 (0)