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

Commit

Permalink
Fix mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu Velten committed Nov 14, 2022
1 parent 169b47c commit 87d1c1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
4 changes: 1 addition & 3 deletions scripts-dev/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,7 @@ def _prepare() -> None:
update_branch(repo)

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

# Special-case SyTest: we don't actually prepare any files so we may
# as well push it now (and only when we create a release branch;
Expand Down
4 changes: 1 addition & 3 deletions synapse/streams/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ def get_sources(self) -> Iterator[Tuple[str, EventSource]]:
class EventSources:
def __init__(self, hs: "HomeServer"):
self.sources = _EventSourcesInner(
# mypy thinks attribute.type is `Optional`, but we know it's never `None` here since
# all the attributes of `_EventSourcesInner` are annotated.
*(attribute.type(hs) for attribute in attr.fields(_EventSourcesInner)) # type: ignore[misc]
*(attribute.type(hs) for attribute in attr.fields(_EventSourcesInner))
)
self.store = hs.get_datastores().main

Expand Down

0 comments on commit 87d1c1d

Please sign in to comment.