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

Pre-emptively fix synapse.storage.types.Connection for future mypy release #8577

Merged
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/8577.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Adjust a protocol-type definition to fit `sqlite3` assertions.
2 changes: 1 addition & 1 deletion synapse/storage/database.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ def __enter__(self) -> "Connection":
self.conn.__enter__()
return self

def __exit__(self, exc_type, exc_value, traceback) -> bool:
def __exit__(self, exc_type, exc_value, traceback) -> None:
return self.conn.__exit__(exc_type, exc_value, traceback)

# Proxy through any unknown lookups to the DB conn class.
Expand Down
2 changes: 1 addition & 1 deletion synapse/storage/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ def rollback(self, *args, **kwargs) -> None:
def __enter__(self) -> "Connection":
...

def __exit__(self, exc_type, exc_value, traceback) -> bool:
def __exit__(self, exc_type, exc_value, traceback) -> None:
ShadowJonathan marked this conversation as resolved.
Show resolved Hide resolved
...